N:=9;
M1:=3;
M2:=3;
P:=9;
AA:=CCI(14);
XXX:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,,COLORRED,LINETHICK2;
YYY:=SMA(XXX,M1,1),COLORWHITE;
ZZZ:=SMA(YYY,M2,1),COLOR00FF00;
XG:IF(BARSLAST(CROSS(YYY,ZZZ)) P AND BARSLAST(CROSS(ZZZ,YYY)) P AND CROSS(YYY,ZZZ)
AND CROSS(AA,-100) AND YYY 20,90,0),COLOR0099FF;