DIFF:EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:EMA(DIFF,9),COLORFFFF00;
macd:(DIFF-DEA)*2;
STICKLINE(MacD>=0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLORGREEN;
{ _通达信股票指标公式}
STICKLINE(MACD<=0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORFF00FF;
STICKLINE(MACD<=0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLOR00FFFF;
DRAWICON(crOSS(DIFF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIFF),DEA,2);