RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=MA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
TYP :=(IF(ISNULL(H),C,H)+IF(ISNULL(L),C,L)+C)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
SRSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
SK:=EMA(SRSV,3);
SD:=MA(SK,3);
XG:J<0 AND CCI<-200 AND SK<30;