以下是自用MACD(源码 副图 贴图)

DIFF1:=EMA(CLOSE,13)-EMA(CLOSE,34);
 DEA1:=EMA(DIFF1,8);
压力:MA(REF(HHV(MACD,63),1),2),COLORWHITE,LINETHICK3;
短压:MA(REF(HHV(MACD,26),1),2),COLORGRAY;
支撑:MA(REF(LLV(MACD,63),1),2),COLORRED,LINETHICK3;
短支:MA(REF(LLV(MACD,26),1),2),COLORGRAY;
 MACD:=2*(DIFF1-DEA1),STICK;
 STICKLINE(MACD>=0 OR MACD<=0,0,0,50,2),COLORWHITE,LINETHICK1;
 DIFF:DIFF1,COLORWHITE,LINETHICK2;
 DEA:DEA1,COLORGREEN,LINETHICK2;
强度:IF(DIFF>=DEA,DIFF,DRAWNULL),COLORRED;
 ES:=REF(EMA(C,34),1);
 EP:=REF(EMA(C,13),1);
 DI:=REF(DIFF,1);
 DIF穿零价:((13+1)*(34-1)*ES-(34+1)*(13-1)*EP)/(2*(34+1)-2*(13+1)),NODRAW,COLORWHITE;
 DIF拐点价:((13-1)*EP/(13+1)-(34-1)*ES/(34+1)-DI)*(34+1)*(13+1)/(2*(13+1)-2*(34+1)),COLORYELLOW,NODRAW;
 STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3.2,0),COLORB20000;
 STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.7,0),COLOREC0000;
 STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2.1,0),COLORFF4600;
 STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1.5,0),COLORFF6300;
 STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0.9,0),COLORFF8B00;
 STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0.3,0),COLORFFAB00;
 STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3.2,0),COLOR000055;
 STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.7,0),COLOR000077;
 STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.1,0),COLOR000099;
 STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.5,0),COLOR0000BB;
 STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.9,0),COLOR0000DD;
 STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.3,0),COLOR0000FF;
 STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3.2,0),COLOR555555;
 STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.7,0),COLOR777777;
 STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.1,0),COLOR999999;
 STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.5,0),COLORBBBBBB;
 STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.9,0),COLORDDDDDD;
 STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.3,0),COLORFFFFFF;
 STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3.2,0),COLORB20000;
 STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.7,0),COLOREC0000;
 STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.1,0),COLORFF4600;
 STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.5,0),COLORFF6300;
 STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.9,0),COLORFF8B00;
 STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.3,0),COLORFFAB00;

瞎捣鼓一下试试:
{飞狐版}
DIFF1:=EMA(C,13)-EMA(C,34);
 DEA1:=EMA(DIFF1,8);
 MACD:=2*(DIFF1-DEA1),STICK;
压力:MA(REF(HHV(MACD,63),1),2),COLORWHITE,LINETHICK2;
短压:MA(REF(HHV(MACD,26),1),2),COLORGRAY;
支撑:MA(REF(LLV(MACD,63),1),2),COLORRED,LINETHICK2;
短支:MA(REF(LLV(MACD,26),1),2),COLORGRAY;
 STICKLINE(MACD>=0 OR MACD<=0,0,0,50,2),COLORWHITE;
 DIFF:DIFF1,COLORWHITE,LINETHICK2;
 DEA:DEA1,COLORGREEN,LINETHICK2;
强度:PARTLINE(DIFF>=DEA,DIFF),COLORRED,LINETHICK2;
 ES:=REF(EMA(C,34),1);
 EP:=REF(EMA(C,13),1);
 DI:=REF(DIFF,1);
 DIF穿零价:((13+1)*(34-1)*ES-(34+1)*(13-1)*EP)/(2*(34+1)-2*(13+1)),LINETHICK,COLORWHITE;
 DIF拐点价:((13-1)*EP/(13+1)-(34-1)*ES/(34+1)-DI)*(34+1)*(13+1)/(2*(13+1)-2*(34+1)),COLORYELLOW,,LINETHICK;
 STICKLINE(MACD< REF(MACD,1) AND MACD>0,0,MACD,7,0),COLOREC0000;
 STICKLINE(MACD< REF(MACD,1) AND MACD>0,0,MACD,5,0),COLORFF4600;
 STICKLINE(MACD< REF(MACD,1) AND MACD>0,0,MACD,3,0),COLORFF6300;
 STICKLINE(MACD< REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORFF8B00;
 STICKLINE(MACD< REF(MACD,1) AND MACD>0,0,MACD,0,0),COLORFFAB00;
 STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,7,0),COLOR000077;
 STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,5,0),COLOR000099;
 STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,3,0),COLOR0000BB;
 STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,1,0),COLOR0000DD;
 STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,0,0),COLOR0000FF;
 STICKLINE(MACD> REF(MACD,1) AND MACD<0,0,MACD,7,0),COLOR777777;
 STICKLINE(MACD> REF(MACD,1) AND MACD<0,0,MACD,5,0),COLOR999999;
 STICKLINE(MACD> REF(MACD,1) AND MACD<0,0,MACD,3,0),COLORBBBBBB;
 STICKLINE(MACD> REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORDDDDDD;
 STICKLINE(MACD> REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORFFFFFF;
 STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,7,0),COLOREC0000;
 STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,5,0),COLORFF4600;
 STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,3,0),COLORFF6300;
 STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORFF8B00;
 STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORFFAB00;
 

 

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