N:=3;
NOTEXT来:50,COLOR008080,DOTLINE;
月K:MA("kdj.K#MONTH"(9,3,3),20),COLORGREEN,NODRAW;
月D:MA("kdJ.D#MONTH"(9,3,3),20),COLORRED,NODRAW;
DRAWBAND(月K,RGB(165,87,16),月D,RGB(120,120,120));
周K:MA("KDJ.K#WEEK"(9,3,3) ,5),COLORMAGENTA,LINETHICK1;
周D:MA("KDJ.D#WEEK"(9,3,3) ,5),COLORCYAN,LINETHICK1;
周J:MA("KDJ.J#WEEK"(9,3,3) ,5),COLORWHITE;
周KD差:=周K-周D;
STICKLINE(周K>=REF(周K,WEEKDAY),8,10,2,0),COLOR0000FF;
STICKLINE(周K<REF(周K,WEEKDAY),8,10,2,0),COLORFFFF00;
STICKLINE(周KD差>=REF(周KD差,WEEKDAY),4,6,2,0),COLOR0000FF;
STICKLINE(周KD差<REF(周KD差,WEEKDAY),4,6,2,0),COLORFFFF00;
RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
日K:SMA(RSV,6,1),NODRAW;
日D:SMA(日K,3,1),NODRAW;
DRAWBAND(日K,RGB(240,20,10),日D,RGB(0,150,70));
日J:=3*日K-2*日D;
ZJ:=MA("KDJ.J#WEEK"(9,3,3) ,1);
{DRAWBAND(周K,RGB(180,0,180),周D,RGB(0,120,0))};
DRAWTEXT((crOSS(周K,周D)AND(周K>周D)),60,'周'),COLORYELLOW;
IF(周J>=REF(周J,1),周J,DRAWNULL),COLOR0080FF,LINETHICK3;