彩色MACD(通达信公式 副图 源码 测试图)无未来函数

[复制链接]
查看80 | 回复0 | 2022-6-27 19:29:28 | 显示全部楼层 |阅读模式

通达信公式彩色MACD

DIFIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEAEA1:=EMA(DIFIF1,9);
MACD1:=2*(DIFIF1-DEAEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.2,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.2,0),COLORGREEN;
STICKLINE(MACD1<MACD2,0,MACD1,0.2,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,20,1),COLORWHITE;
DIFIF1,COLOR33FF33,LINETHICK1;
DEAEA1,COLORYELLOW,LINETHICK1;
MACD:MACD1,NODRAW,COLORMAGENTA;
DRAWTEXT(CROSS(DIFIF1,DEAEA1) AND DIFIF1<1,DIFIF1,'↑买'),LINETHICK1, COLORYELLOW;
DRAWTEXT(CROSS(DEAEA1,DIFIF1)AND MACD<REF(MACD,1),DEAEA1,'↓卖'),LINETHICK1, COLORGREEN;
红面积:IF(DIFIF1>DEAEA1,SUM(MACD,BARSLAST(CROSS(DIFIF1,DEAEA1))),DRAWNULL),NODRAW,COLORLIRED;
绿面积:IF(DIFIF1<DEAEA1,SUM(MACD,BARSLAST(CROSS(DEAEA1,DIFIF1))),DRAWNULL),NODRAW,COLORGREEN;
DRAWNUMBER(CROSS(DIFIF1,DEAEA1),DEAEA1,REF(绿面积,1)),COLORGREEN;
DRAWNUMBER(CROSS(DEAEA1,DIFIF1),DEAEA1*1.1,REF(红面积,1)),COLORLIRED;
DRAWNUMBER(DIFIF1>DEAEA1,MACD,BARSLAST(CROSS(DIFIF1,DEAEA1))+1),COLORRED;
DRAWNUMBER(DIFIF1<DEAEA1,MACD,BARSLAST(CROSS(DEAEA1,DIFIF1))+1),COLORCYAN;
DIF:=EMA(C+SLOPE(C,12),12)-EMA(C+SLOPE(C,26),26),COLORWHITE;
DEA:=EMA(DIF+SLOPE(DIF,6),6),COLORGREEN;
SDEA:REF(HHV(DEA,BARSLAST(CROSS(DEA,DIF))+1),1),COLORMAGENTA;
BDEA:REF(LLV(DEA,BARSLAST(CROSS(DIF,DEA))+1),1),COLORAAAA00;
CD:MACD,COLORCYAN;
涨CD:IF(CD>REF(CD,1),CD,DRAWNULL),COLORRED,LINETHICK1;
涨DIFIF1:IF(DIFIF1>REF(DIFIF1,1),DIFIF1,DRAWNULL),COLORRED,LINETHICK1;
A1:=BARSLAST(REF(CROSS(DIFIF1,DEAEA1),1));
多空分界线:0,COLORGREEN;

p20191211924791124.jpg

p20191211924791124.jpg

20191211924115049.rar

3.5 KB, 下载次数: 0

售价: 6 金钱  [记录]  [购买]

20191211924115049.rar

回复

使用道具 举报

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

本版积分规则