通达信MACD今买明卖副图指标 源码

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);