MACD中枢指标 通达信公式(附图)

[复制链接]
查看116 | 回复0 | 2021-8-20 18:59:12 | 显示全部楼层 |阅读模式

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:2*(DIF-DEA),COLORSTICK;
DRAWBAND(DIF,RGB(255,0,128),DEA,RGB(0,128,128));
HMJ:=IF(DIF>DEA,SUM(MACD,BARSLAST(CROSS(DIF,DEA))),DRAWNULL);
LMJ:=IF(DIF<DEA,SUM(MACD,BARSLAST(CROSS(DEA,DIF))),DRAWNULL);
DRAWNUMBER(CROSS(DIF,DEA),DEA,REF(LMJ,1)),COLORGREEN;
DRAWNUMBER(CROSS(DEA,DIF),DEA,REF(HMJ,1)),COLORLIRED;
红柱数:IF(DIF>DEA AND ISLASTBAR,BARSLAST(CROSS(DIF,DEA))+1,DRAWNULL),COLORLIRED,NODRAW;
绿柱数:IF(DIF<DEA AND ISLASTBAR,BARSLAST(CROSS(DEA,DIF))+1,DRAWNULL),COLORCYAN,NODRAW;

 

回复

使用道具 举报

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

本版积分规则