Exit Criteria for Back Tester

Optuma Forums Optuma Scripting Exit Criteria for Back Tester

This topic contains 4 replies, has 2 voices, and was last updated by  Jennifer 1 week, 1 day ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #48507

    Jennifer
    • Topics: 3
    • Replies: 3
    • Posts: 6

    I am using the following script as my exit criteria in the Back Tester.

    LOW() CrossesBelow VTS(ATRBARS=15, MULT=4.00)

    I would like my exit to occur when price hits the VTS at the highest level it has reached since entry.

    I think I need to be able to code it to move the VTS up only.

    I have placed a screen shot below to illustrate.

    I want the exit to occur when the red bar indicated hits the price level 71.80 and not after the VTS has moved down, which is how it is currently exiting.

    Thank you,

    Jennifer Taylor

    VTS

    #48511
    Matthew
    Matthew
    • Topics: 3
    • Replies: 75
    • Posts: 78

    Hi,

    One thing you can try is wrapping the VTS in a Highest High function. That would give you the ability to control how quickly the line goes down. In the following example i used a 20 bar highest high function (red), which you can see extends the lines high value when the VTS line (green) begins to drop away.

    Ex3

    You can adjust how long this effect lasts by increasing / decreasing the Highest Highs look back period.

    The script i used for the show bar arrows in this example is:

     

     

    #48515

    Jennifer
    • Topics: 3
    • Replies: 3
    • Posts: 6

    Thanks Mathew,

    Do I need the custom tool feature in order to place the red line on the chart as you have?

    #48519
    Matthew
    Matthew
    • Topics: 3
    • Replies: 75
    • Posts: 78

    Hi,

    No need for the custom tool module, I plotted the red line on my chart using the Show Plot tool, and the following script:

     

    #48523

    Jennifer
    • Topics: 3
    • Replies: 3
    • Posts: 6

    Thanks Mathew 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

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