Hi all,
Is there a code in PRT to detect
-Triple ascending tops A,B,C, where C>B>A ;
and also
-Triple descending bottoms A,B,C, where C<B<A;
within a specified look back interval?
Any advice or guidance for the codes will be appreciated. Thank you in advance.
Cheers
There you go:
p = 20 //change to widen or narrow results
//
T1 = highest[p](high)
T2 = highest[p](high[p])
T3 = highest[p](high[p*2])
Top = T1 > T2 AND T2 > T3
//
B1 = lowest[p](low)
B2 = lowest[p](low[p])
B3 = lowest[p](low[p*2])
Bot = B1 < B2 AND B2 < B3
//
x = 0
IF Top THEN
x = 1
ELSIF Bot THEN
x = 2
ENDIF
SCREENER[x](x AS "1=↑, 2=↓")