SHORT:=12;LONG:=26;MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
macd:(DIF-DEA)*2,COLORSTICK;
{ _通达信股票指标公式}
DRAWICON(crOSS(DIF,DEA),DEA*0.98,1);
DRAWICON(CROSS(DEA,DIF),DEA*0.98,2);
DRAWICON(CROSS(REF(DEA,1),REF(DIF,1)) AND CROSS(DIF,DEA),DEA-0.1,9);