大智慧快线MACD指标公式

[复制链接]
查看94 | 回复0 | 2021-8-21 13:29:04 | 显示全部楼层 |阅读模式

DIFF : EMA(CLOSE,6) - EMA(CLOSE,13);
DEA : EMA(DIFF,9);
MACD : 2*(DIFF-DEA), COLORSTICK;
A1:=BARSLAST(REF(CROSS(DIFF,DEA ),1));
DRAWTEXT(REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA)>0 ,DIFF,'M'),COLOR00FFFF;{MACD底背离};
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
DRAWTEXT(REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF)>0,DIFF,'M'),COLOR00FF00;{MACD顶背离};

202108211152.jpg

202108211152.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则