N:=3;M1:=9;M2:=9;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=Sma(RSV,M1,1) COLORRED;
D:=SMA(K,M2,1)COLORYELLOW LINETHICK2;
J:=3*K-2*D COLORLIMAGENTA;
平衡:(HHV(HIGH,N)-LLV(LOW,N))*(3*D-2*K)/100+LLV(LOW,N) NODRAW;
月K:"KDJ.K#MONTH"(9,3,3),COLOR0080FF,DOTLINE;
月D:"KDJ.D#MONTH"(9,3,3),COLOR0080FF,LINETHICK3;
月J:="KDJ.J#MONTH"(9,3,3);
周K:"KDJ.K#WEEK"(9,3,3),COLORWHITE,DOTLINE;
周D:"KDJ.D#WEEK"(9,3,3),COLORWHITE,LINETHICK3;
周J:="KDJ.J#WEEK"(9,3,3);
日K:"KDJ.K#DAY"(9,3,3),COLORRED,DOTLINE;
日D:"KDJ.D#DAY"(9,3,3),COLORRED,LINETHICK3;
日J:="KDJ.J#DAY"(9,3,3);
分K:"KDJ.K"(9,3,3),COLORCYAN,DOTLINE;
分D:"KDJ.D"(9,3,3),COLORCYAN,LINETHICK3;
分J:="KDJ.J"(9,3,3);
分金叉:IF(crOSS(分K,分D) AND (分D<40 OR 分D>60),20,0),COLORCYAN;
日金叉:IF(CROSS(日K,日D) AND (日D<40 OR 日D>60),20,0),COLORRED;
周金叉:IF(CROSS(周K,周D) AND (周D<40 OR 周D>60),30,0),COLORWHITE;
月金叉:IF(CROSS(月K,月D) AND (月D<40 OR 月D>60),40,0),COLOR0080FF;
共振:(周金叉 AND 日金叉) OR (周金叉 AND 月金叉) OR (日金叉 AND 月金叉),COLORBLUE,NODRAW;
STICKLINE(共振,0,50,1,0),COLORBLUE;
STICKLINE(月J<0,0,月J,2,-1),COLOR0080FF;
STICKLINE(月J>100,100,月J,2,-1),COLOR0080FF;
STICKLINE(周J<0,0,周J,1,-1),COLORWHITE;
STICKLINE(周J>100,100,周J,1,-1),COLORWHITE;
STICKLINE(日J<0,0,日J,0,0),COLORRED;
STICKLINE(日J>100,100,日J,0,0),COLORRED;