RSV:=(CLOSE-LLV(LOW,14))/(HHV(HIGH,14)-LLV(LOW,14))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:3*K-2*D,COLORRED;
A2:=LLVBARS(J,30),LINETHICK0;
A:=(REF(J,1)-LLV(J,A2+3))/ABS(LLV(J,A2+3))>0.02 AND A2>6 AND A2<30,LINETHICK0;{DIFF值大于前面的最低点并且K上次的最低点距离本周期的周期数大于6小于30}
B:=J>REF(J,1) AND REF(J,1)<REF(J,2),LINETHICK0;{K值的反转形态}
E:=(LLV(LOW,4)-LLV(LOW,A2+6))/LLV(LOW,A2+6)<0.02,LINETHICK0;{上一周期股价小于30周期内的最低点}
背离:IF(A AND B AND E,50,0);
STICKLINE(J>REF(J,1),HHV(J,3),LLV(J,3),0,0),COLOR00AAFF;
STICKLINE(J>REF(J,1),J,REF(J,1),3,0),COLOR0066FF;
STICKLINE(J>REF(J,1),J,REF(J,1),2,0),COLOR0088FF;
STICKLINE(J>REF(J,1),J,REF(J,1),1,0),COLOR0099FF;
STICKLINE(J>REF(J,1),J,REF(J,1),0.5,0),COLOR00AAFF;
STICKLINE(J<REF(J,1),HHV(J,3),LLV(J,3),0,0),COLORFFAA00;
STICKLINE(J<REF(J,1),J,REF(J,1),3,0),COLORFF3300;
STICKLINE(J<REF(J,1),J,REF(J,1),2,0),COLORFF6600;
STICKLINE(J<REF(J,1),J,REF(J,1),1,0),COLORFF9900;
STICKLINE(J<REF(J,1),J,REF(J,1),0.5,0),COLORFFAA00;
快:SMA(RSV,3,1);
慢:SMA(K,3,1),COLOR00FF00;