Low to be above 1.5 ATR VTS included in entry criteria

Using the back tester, I am using a 1.5ATR VTS with a highest high lookback period of 40, using the script below for the exit criteria.

V1 = VTS(BARS=15, ATRBARS=15, MULT=1.50) ;

V2 = HIGHESTHIGH(V1, BARS=40) ;

LOW() is above V2

I have been trying to add to my entry criteria, the condition that the low of the bar must be above the VTS in order for the entry to trigger.

My entry script below works on it’s own,

CLOSE() > HIGHESTHIGH(CLOSE(), RANGE=Look Back Period, BARS=5)AND

CLOSE() > MA(BARS=34, STYLE=Exponential, CALC=Close) and

MA(BARS=34, STYLE=Exponential, CALC=Close) IsUp

Can you tell me how I can add to my entry criteria, the condition that the low of the bar must be above the 1.5ATR VTS (with the highest high lookback period of 40) in order for the entry to trigger.

Thank you

Kind regards,

Jennifer Taylor

Hi Jennifer,

I think the problem is with the ‘Is Above’ which is not a recognised Optuma scripting function - instead I think you need to use CrossesAbove, and then just join the conditions with an ‘and’:

V1 = VTS(BARS=15, ATRBARS=15, MULT=1.50) ;

V2 = HIGHESTHIGH(V1, BARS=40) ;

LOW() CrossesAbove V2 and

CLOSE() > HIGHESTHIGH(CLOSE(), RANGE=Look Back Period, BARS=5)AND

CLOSE() > MA(BARS=34, STYLE=Exponential, CALC=Close) and

MA(BARS=34, STYLE=Exponential, CALC=Close) IsUp