N:=60;
M:=34;
A1:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
CC:=(2*CLOSE+HIGH+LOW)/4;
A2:=EMA((CC-LLV(LOW,M))/(HHV(HIGH,M)-LLV(LOW,M))*100,13);
A3:=EMA(0.667*REF(A2,1)+0.333*A2,2);
A4:=SMA(A1,20,1);
A5:=SMA(A4,5,1);
T1:=A2-A3>0 AND A4-A5>0 AND A3>A4;
XG:T1 AND REF(T1,1)=0 AND C>O AND V>REF(V,1);