rsv9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K9:= SMA(rsv9,3,1),COLORffFFFF,LINETHICK3;
D9:= SMA(K9,3,1),COLOR00FF00,LINETHICK3;
J9:=3*K9-2*D9,COLORFFA2AF,LINETHICK3;
ma13:=ma(c,13);
ma21:=ma(c,21);
aa:=ma13>ref(ma13,1) and c<50 and ma21>ref(ma21,1) and
ma13>ma21;
xg:if(aa,1,0);