DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
macd:(DIF-DEA)*2,COLORSTICK;
红面积:SUM(MacD,BArslAST(MACD<0))*(MACD>0),COLOR0000FF,NODRAW;
绿面积:SUM(MACD,BARSLAST(MACD>0))*(MACD<0),COLORFFFF00,NODRAW;
AA:=ROUND(REF(绿面积,1)*100);
BB:=ROUND(REF(红面积,1)*100);
DRAWNUMBER(crOSS(0,MACD),HHV(REF(MACD,1),5)+0.03,Abs(BB)),COLORMAGENTA;
DRAWNUMBER(CROSS(MACD,0),LLV(REF(MACD,1),5)-0.03,ABS(AA)),COLORGREEN;