以下是李氏MACD源码附图

DIF1:=EMA(CLOSE,12) – EMA(CLOSE,27),LINETHICK2;

DEA1:=EMA(DIF1,9),LINETHICK2;

MACD1:=2*(DIF1-DEA1),STICK;

MACD2:=EMA(MACD1,3);

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3.2,0),COLOR000055;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.7,0),COLOR000077;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.1,0),COLOR000099;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1.5,0),COLOR0000BB;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.9,0),COLOR0000DD;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.3,0),COLOR0000FF;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3.2,0),COLOR555555;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.7,0),COLOR777777;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.1,0),COLOR999999;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1.5,0),COLORBBBBBB;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.9,0),COLORDDDDDD;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.3,0),COLORFFFFFF;

STICKLINE(MACD1<MACD2,0,MACD1,3.2,0),COLORB20000;

STICKLINE(MACD1<MACD2,0,MACD1,2.7,0),COLOREC0000;

STICKLINE(MACD1<MACD2,0,MACD1,2.1,0),COLORFF4600;

STICKLINE(MACD1<MACD2,0,MACD1,1.5,0),COLORFF6300;

STICKLINE(MACD1<MACD2,0,MACD1,0.9,0),COLORFF8B00;

STICKLINE(MACD1<MACD2,0,MACD1,0.3,0),COLORFFAB00;

STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,0.5),colorwhite;

低位金叉:=CROSS(DIF1,DEA1) AND DIF1<-0.1;

STICKLINE(低位金叉,0,0.04,6,0),coloryellow;

JCCOUNT:=COUNT(CROSS(DIF1,DEA1),BARSLAST(DEA1>=0));

二次金叉:=CROSS(DIF1,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2,21)=1;

STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;

DRAWICON(二次金叉,DEA1*0.9,1) ;

DRAWTEXT(二次金叉,0.2,’ 二次金叉’),coloryellow;

DIF:DIF1,COLOR33FF33;

DEA:DEA1,coloryellow;

MACD:MACD1,NODRAW,colormagenta;

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。