N:=9; KN:=3; DN:=3;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:SMA(RSV,KN,1),COLORWHITE;
D:SMA(K,DN,1),COLORYELLOW;J:3*K-2*D,COLORMAGENTA;IF(J =REF(J,1),J,DRAWNULL),COLORMAGENTA;IF(J REF(J,1),J,DRAWNULL),COLORGREEN;0.00;20.00;50.00;80.00;100.00;
DRAWICON(CROSS(J,1),J,1);
IF(J 0,J,DRAWNULL),COLORGREEN,LINETHICK2;
IF(K 90,K,DRAWNULL),COLOR0000FF,LINETHICK2;
IF(D 85,D,DRAWNULL),COLORFFFF11,LINETHICK2;
DRAWICON(K 80 AND D 80 AND CROSS(D,K),D,2);
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);{www.9m8.cn 九毛八公式指标网}
STICKLINE(CROSS(BIAS,乖离) AND J 0 AND 乖离 -9.5,60,0,2,0),COLORRED;