评论

收藏

哪位大神可以把这个macd的源码写成mq4格式拜托

avatar kenson337 | 2043 人阅读 | 0 人评论 | 2017-10-19

本帖最后由 kenson337 于 2017-10-19 08:46 编辑

DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0,0),COLORRED;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0,0),COLORYELLOW;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORCYAN;
STICKLINE(MACD>=REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORMAGENTA;
IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK1;
IF(DIF>=REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK1;
{MACD提示};
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)> C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWICON(B1>0,DIF*1.21,1);{MACD底背离}
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)> "MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWICON(D1>0,DEA*1.21,2);{MACD顶背离};
草图.png
""
还没有人打赏,支持一下
您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则