N:=9; M1:=3; M2:=3;
周K:MA( KDJ.K#WEEK (N,M1,M2) ,5),LINETHICK1,COLORMAGENTA;
周D:MA( KDJ.D#WEEK (N,M1,M2) ,5),LINETHICK1,COLORWHITE;
周J:=MA( KDJ.J#WEEK (N,M1,M2) ,5),LINETHICK1,COLORMAGENTA;
月K:MA( KDJ.K#MONTH (N,M1,M2),5),LINETHICK1,COLORGREEN;
月D:MA( KDJ.D#MONTH (N,M1,M2),5),LINETHICK1,COLORRED;
月J:=MA( KDJ.J#MONTH (N,M1,M2),5),LINETHICK1,COLORBLUE;
DRAWBAND(月K,RGB(100,0,100),月D,RGB(120,120,120));
DRAWBAND(周K,RGB(200,20,10),周D,RGB(10,100,200));
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1),COLORRED;
D:SMA(K,M2,1),COLORGREEN;
J:3*K-2*D,COLORWHITE;
日K:= KD.K ,COLORWHITE;
日D:= KD.D ,COLORWHITE,LINETHICK2;
日金叉:IF(CROSS(日K,日D),20,0),COLORWHITE;
周金叉:IF(CROSS(周K,周D),40,0),COLORRED;
月金叉:IF(CROSS(月K,月D),60,0),COLOR0080FF;
周死叉:IF(CROSS(周D,周K),40,0),COLORBLUE;
月死叉:IF(CROSS(月D,月K),60,0),COLORGREEN;
DRAWICON(周金叉 AND 日金叉,5,15);
DRAWICON(周金叉 AND 月金叉,8,11);
DRAWICON(日金叉 AND 月金叉,13,17);