CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
CCI1:=CCI-REF(CCI,1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
XG:REF(CCI,1) < 50 AND CCI>=50 AND CCI < 100 AND CCI1>=50 AND J > K AND J > D AND REF(J,1) < REF(K,1) AND REF(J,1) < REF(D,1) ;