Customise True Strength Indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #232118 quote
    WhyAskOZ
    Participant
    New

    I am looking to make a customised True Strength Index indicator as the standard TSI that comes pre-built in PRT can’t be customised and it also doesn’t work for pr-screener.

    There are two TSI code in the library but both of them have different value then PRT in-built TSI code. Appreciate if anyone can provide code for TSI that matches pre-built TSI indicator but in addition allow to add 3 horizontal lines that w can change how we want going into setting.

    current default TSI gives two fixed line, one at 25 and another at -25. What I would like is 3 lines one at -25, 0 and 25 and possible this line location we can change from the setting then it would be helpful.

    Below, article gives the formula for TSI. Obviously, there are many such article on google so you use whichever you prefer.

     

    https://school.stockcharts.com/doku.php?id=technical_indicators:true_strength_index

    thanks,

    #232119 quote
    JS
    Participant
    Veteran

    Hi,

    Try this one:

     

    PC=Close-Close[1]
    FSPC=Average[25,1](PC)
    DSPC=Average[13,1](FSPC)
    
    APC=Abs(Close-Close[1])
    FSAPC=Average[25,1](APC)
    DSAPC=Average[13,1](FSAPC)
    
    TSI=100*(DSPC/DSAPC)
    
    DrawHLine(LL)Coloured("Red")
    DrawHLine(ZL)
    DrawHLine(HL)Coloured("Green")
    
    Return TSI as "True Strength Indicator"
    WhyAskOZ thanked this post
    Scherm­afbeelding-2024-05-01-om-07.56.24.png Scherm­afbeelding-2024-05-01-om-07.56.24.png TSI-Custom.itf
    #232156 quote
    WhyAskOZ
    Participant
    New

    Thank you so much, It does work same as PRT inbuilt TSI and also provides 3 lines.

     

    I have to manually add zero line for each stock earlier while your code is very helpful and should be added to the library as it will help others.

    JS thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Customise True Strength Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
WhyAskOZ @g42dav Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by WhyAskOZ
1 year, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/01/2024
Status: Active
Attachments: 2 files
Logo Logo
Loading...