N:=27;
N1:=5;
RSV1:=(LLV(LOW,N)-C)/(HHV(HIGH,N)-LLV(LOW,N))*100+50;{WR(27,3,3)+50}
K1:SMA(RSV1,3,1),colorwhite,LINETHICK3;
D1:SMA(K1,3,1),coloryellow;
RSV2:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100-50;{KDJ(27,3,3)-50}
K2:SMA(RSV2,3,1),color00FFFF,LINETHICK3;
D2:SMA(K2,3,1),coloryellow;
MMK:(K1+K2)/2,COLORRED,LINETHICK3;
RSV3:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;{正常kdj(5,3,3)}
短K:SMA(RSV3,3,1),colorAAAAAA;
短D:SMA(短K,3,1),colorAAAAAA,linethick2;
短J:3*短K-2*短D,COLORFF99FF;
stickline(K2>ref(K2,1),K2,K2,8,0),colorred,linethick3;{K2变色红黄}
stickline(K1<ref(K1,1),K1,K1,8,0),colorgreen,linethick3;{K1变色白绿}
0,COLORFFA2AF,LINETHICK2;
50,COLORFFA2AF,POINTDOT;
100,COLORFFA2AF,POINTDOT;