把这个同图显示的日月周KDJ金叉改成通达信的
2020/5/3 18:25:31
公式编写说明:
DRAWGBK(1,colorrgb(0,0,200),colorrgb(50,50,0),1);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;月K:= MA("KDJ.K#MONTH"(9,3,3),20),COLORFF00FF;月D:= MA("KDJ.D#MONTH"(9,3,3),20),COLOR00FFFF;月J:=MA("KDJ.J#MONTH"(9,3,3),20); FILLRGN(月K>=月D,月K,月D),COLORFF00FF;FILLRGN(月K<月D,月K,月D),COLOR888888;DRAWICON(月K>=月D,4,10);DRAWICON(月K>=月D,0,10);DRAWICON(月K<月D,0,12);周K:=MA("KDJ.K#WEEK"(9,3,3) ,5);周D:=MA("KDJ.D#WEEK"(9,3,3) ,5);周J: MA("KDJ.J#WEEK"(9,3,3) ,5),COLORFF00FF,LINETHICK3,POINTDOT;PARTLINE(周J<REF(周J,1),周J),COLOR00FF00,LINETHICK1,POINTDOT;STICKLINE(周K>=周D,周K,周D,6,0),COLOR0000FF;STICKLINE(周K<周D,周K,周D,6,1),COLOR00FFFF;DRAWICON(周K>=周D,96,10);DRAWICON(周K>=周D,100,10);DRAWICON(周K<周D,100,12);DRAWICON(K>=D,46,13);DRAWICON(K>=D,50,13);DRAWICON(K>=D,54,13);DRAWICON(K<D,48,12);DRAWICON(K<D,52,12);DRAWTEXTEX(c,1,2,90,'周KDJ金叉 '),ColorFFFFFF;DRAWTEXTEX(c,1,2,560,'日KDJ金叉 '),ColorFFFFFF;DRAWTEXTEX(c,1,2,880,'月KDJ金叉 '),Color00FF00;
公式源码回答:
月K:"KDJ.K"(89,3,3),COLOR00FF00;
月D:"KDJ.D"(89,3,3),COLOR00FF00,LINETHICK2;
周K:"KDJ.K"(27,3,3),COLORRED;
周D:"KDJ.D"(27,3,3),COLORRED,LINETHICK2;
日K:"KD.K"(5,3,3),COLORWHITE;
日D:"KD.D"(5,3,3),COLORWHITE,LINETHICK2;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
日J:3*K-2*D,COLORMAGENTA;
日金叉:IF(CROSS(日K,日D),50,0),COLORFFFFFF;
DRAWTEXT(日金叉,50,'日叉'),COLORFFFFFF;
周金叉:IF(CROSS(周K,周D),30,0),COLORRED;
DRAWTEXT(周金叉,30,'周叉'),COLORRED;
月金叉:IF(CROSS(月K,月D),20,0),COLOR0080FF;
DRAWTEXT(月金叉,20,'月叉'),COLORYELLOW;
{KD在30以下多次金叉}
JM:=CROSS("KDJ.K"(5,3,3),"KDJ.D"(5,3,3));
JMCOUNT:=COUNT(JM,BARSLAST("KDJ.D"(5,3,3)>=30));
JMTJ:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=1,21)=1);
DRAWTEXT (JMTJ,70,'①'),COLORWHITE;
JMTJ2:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=2,21)=1);
DRAWTEXT (JMTJ2,70,'②'),COLORYELLOW;
JMTJ3:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=3,21)=1);
DRAWTEXT (JMTJ3,70,'③'),COLORYELLOW;
JMTJ4:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=4,21)=1);
DRAWTEXT (JMTJ4,70,'④'),COLORYELLOW;
JMTJ5:=28*("KDJ.D"(5,3,3)<30 AND COUNT(JMCOUNT=5,21)=1);
DRAWTEXT (JMTJ5,70,'⑤'),COLORYELLOW;
投股票 网 ww w.tou18.cn
股市公式下载推荐