MID := MA(CLOSE,7);
HH:=MID + 2*AVEDEV(CLOSE,10);
LL:=MID - 2*AVEDEV(CLOSE,10);
RSV:= (CLOSE-MID)/AVEDEV(CLOSE,20)*7;
K:=SMA(RSV,3,1),COLORWHITE;
D:=SMA(K,3,1),COLORYELLOW;
J:=3*K-2*D;
VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
XG2:crOSS(K,MID) AND VAR1>0,COLORLIGREEN,LINETHICK3;