TRV:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),12);
, Q5 G3 A& A0 E- QHD :=HIGH-REF(HIGH,1);5 D8 L, m, C6 D- C; v: R" q9 O: c
LD :=REF(LOW,1)-LOW;
0 j; `1 q% ^$ a# b& FDMP:=EMA(IF(HD>0 and HD>LD,HD,0),12);
7 q, B) k1 _' }3 v2 Y7 G+ ADMM:=EMA(IF(LD>0 and LD>HD,LD,0),12);- N6 V2 R0 {0 x6 z6 P" k3 l
PDI:= DMP*100/TRV;! l9 y# K/ u. y
MDI:= DMM*100/TRV;6 b! f4 n4 v1 B
ADX:= EMA(ABS(MDI-PDI)/(MDI+PDI)*100,2);
. g: @- _+ ~; {2 JADXR:=EMA(ADX,2);
9 m$ E: \% k# Z; f5 O# t
- Y1 e6 ^& u9 d3 M# gadxsc:=cross(adxr,adx) and pdi>ref(pdi,1); T( c5 g5 n( r" T1 P- e
+ [* }7 V" E& w" BRSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
! N# j P3 U" g% U1 p3 ]K:=SMA(RSV,3,1);
' N& H$ K7 K) B' ?D:=SMA(K,3,1);/ \5 w4 ^7 u+ Y/ Q
J:=3*K-2*D;! i1 R# M9 g) T$ d. {
, b# ]6 X; k- E0 U( w
jj:=cross(j,k);5 f# V1 H# Z& b* V4 i; U# T* W
$ q& m A5 P( m, P. d! Wvv:=count(v=2 and ref(v,1)=llv(v,3) and v>ref(v,1);
8 k& {" L/ o& X' n6 R5 F9 q3 j" q% d0 |4 U7 r
ma3:=ma(c,3);ma5:=ma(c,5);) t) f! F1 R' ^ E/ A1 I6 [* x' S' N
pl:=abs(ma3-ma5)/ma3*100ma3 and adxsc and jj and pl |