以下是通达信彩色MACD无未来函数放心使用!
彩色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;股
评论(0)