分享

多周期MACD

 小明518 2016-03-09

多周期MACD

(2015-02-09 15:02:59)


DIF55:=(EMA(CLOSE,48)-EMA(CLOSE,104));
DEA55:=(EMA(DIF55,36));
DRAWBAND(DEA55,RGB(50,150,50),DIF55,RGB(255,50,50));
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK1;
DEA:EMA(DIFF,9),LINETHICK1;
MACD:=(DIFF-DEA)*2, COLORSTICK;
DRAWTEXT(REF(MACD,1)>0 AND MACD<0,MACD-0.01,'1'),COLOR0000FF;
DRAWTEXT(REF(MACD,2)>0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'2'),COLOR0000FF;
DRAWTEXT(REF(MACD,3)>0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'3'),COLOR0000FF;
DRAWTEXT(REF(MACD,4)>0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'4'),COLOR0000FF;
DRAWTEXT(REF(MACD,5)>0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'5'),COLOR0000FF;
DRAWTEXT(REF(MACD,6)>0 AND REF(MACD,5)<0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'6'),COLOR0000FF;
DRAWBAND(DIFF,RGB(244,224,244),DEA,RGB(0,255,255));{60F}
 F60:EMA(CLOSE,12/2)-EMA(CLOSE,26/2),COLORCYAN;
 A60:EMA(F60,9/2);
 DRAWBAND(F60,RGB(144,0,0),A60,RGB(0,144,144));{30F}
 F30:(EMA(CLOSE,12/4)-EMA(CLOSE,26/4)),COLORGREEN;
 A30:(EMA(F30,9/4));
 DRAWBAND(F30,RGB(235,190,235),A30,RGB(0,96,255));{15F};
DRAWTEXT(REF(MACD,1)>0 AND MACD<0,MACD-0.01,'1');
DRAWTEXT(REF(MACD,2)>0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'2');
DRAWTEXT(REF(MACD,3)>0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'3');
DRAWTEXT(REF(MACD,4)>0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'4');
DRAWTEXT(REF(MACD,5)>0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'5');
DRAWTEXT(REF(MACD,6)>0 AND REF(MACD,5)<0 AND REF(MACD,4)<0 AND REF(MACD,3)<0 AND REF(MACD,2)<0 AND REF(MACD,1)<0 AND MACD<0,MACD-0.01,'6');
MACD1:(DIFF-DEA)*2, COLORSTICK;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约