Exit Criteria for Back Tester

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

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:

V1 = VTS(BARS=15, ATRBARS=15, MULT=4.00) ;
V2 = HIGHESTHIGH(V1, BARS=20) ;
CLOSE() CrossesBelow V2

 

 

Thanks Mathew,

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

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:

V1 = VTS(BARS=15, ATRBARS=15, MULT=4.00) ;
V2 = HIGHESTHIGH(V1, BARS=20) ;
V2

 

Thanks Mathew :)