通达信改了一下MACD,看上去更直观
2017-10-13网络 编 辑:翔博软件
MACD副图指标}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
STICKLINE(MACD>0,0,MACD,-1,0),COLORMAGENTA;
STICKLINE(MACD<0,0,MACD,-1,0),COLORBLUE;
{下边标天数}
HZZ:=BARSLASTCOUNT(MACD>0);
HDS:=MOD(HZZ,2);
LZZ:=BARSLASTCOUNT(MACD<0);
LDS:=MOD(LZZ,2);
DRAWNUMBER(HDS,MACD*1.03,HZZ),DRAWABOVE;
DRAWNUMBER(LDS,MACD*1.03,LZZ);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
STICKLINE(MACD>0,0,MACD,-1,0),COLORMAGENTA;
STICKLINE(MACD<0,0,MACD,-1,0),COLORBLUE;
{下边标天数}
HZZ:=BARSLASTCOUNT(MACD>0);
HDS:=MOD(HZZ,2);
LZZ:=BARSLASTCOUNT(MACD<0);
LDS:=MOD(LZZ,2);
DRAWNUMBER(HDS,MACD*1.03,HZZ),DRAWABOVE;
DRAWNUMBER(LDS,MACD*1.03,LZZ);