Using Signal After

Hii Sir,

I am trying to use signal after for following condition.

close crosses above SMA 89
after which 10 day high breakout.

I have tried below 2 codes both doesn’t seem to be working.
If you see attached pic its also showing signal below MA 89.

Regards,
Deepak

v0 = CLOSE() CrossesAbove MA(BARS=89, CALC=Close); 
v1 = CLOSE() CrossesAbove HIGHESTHIGH(BARS=10); 
SIGNALAFTER(v0,v1)


v0 = CLOSE() > MA(BARS=89, CALC=Close); 
v2= v0 ChangeTo 1; 
v1 = CLOSE() CrossesAbove HIGHESTHIGH(BARS=10);
SIGNALAFTER(v2,v1)

Hi,

The Signal After will show the first instance of the second criteria after the first has been met. It will not take into account whether then Close has crossed below the MA since the trigger.

If you want to make sure the Close is still above the 89SMA after the first criteria has triggered you can update the script to use the following:

v0 = CLOSE() CrossesAbove MA(BARS=89, CALC=Close); 
v1 = CLOSE() CrossesAbove HIGHESTHIGH(BARS=10); 
V2 = CLOSE() > MA(BARS=89, CALC=Close);
SIGNALAFTER(v0,v1) and V2