Trailing % Stop Tool

Optuma Forums Optuma Scripting Trailing % Stop Tool

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #57991
    DarrenDarren
    • Topics: 53
    • Replies: 395
    • Posts: 448

    Using the POINTS() function combined with RATCHET() it’s possible to create a trailing stop tool based on any technical measure. Use this example in a Show Plot tool to plot a trailing stop 20% from the closing price of the bar on which you click. As the price rises the red line will maintain 20% away from the closing price, and will remain flat when the price falls.

    Remember to save the tool as an indicator in the same tool view to add it to your toolbox.

    Capture

    2 users thanked author for this post.
    #58101
    AvatarThomas
    • Topics: 59
    • Replies: 84
    • Posts: 143

    Hi Darren,

    many thanks for your % trailing stop script.

    Is it possible to change the script that the % trailing script can also be applied when I click the high of a bar that is an important pivot high so that the % trailing stop works the same way as when I click the low of an important pivot low?

    Another question: Is it also possible that the % trailing stop indicator stops calculating/plotting the red line when the price moves below/above the trailing stop red line? So it works the same way as the ATR Trailing Stop tool but instead using average true range it uses percent changes.

    Or to formulate my questions in a different way: Can you create a tool that works like the ATR Trailing Stop but uses instead the average true range it uses percent changes?

    Thanks

    Thomas

    #58179
    DarrenDarren
    • Topics: 53
    • Replies: 395
    • Posts: 448

    Hi Thomas,

    Do you mean you want to draw the line 20% above the high? If so, change line 5 to the following:

    PCT=HIGH()*1.2;

    Then click on the RATCHET function (line 9) and change the direction to Down.

    It’s not possible to stop the line when it is crossed in scripting – that will require a new tool to be developed.

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

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close