dif:Ema(CLOSE,12)-ema(CLOSE,26);
DEA:EMA(DIF,9);
MacD:(DIF-DEA)*2,COLORSTICK;
红面积:IF(DIF>DEA,SUM(macd,BArslAST(crOSS(DIF,DEA))),DRAWNULL),NODRAW,COLORLICYAN;
绿面积:IF(DIF<DEA,SUM(MACD,BARSLAST(CROSS(DEA,DIF))),DRAWNULL),NODRAW,COLORCYAN;
DRAWNUMBER(CROSS(DIF,DEA),DEA,REF(绿面积,1)),COLORCYAN;
DRAWNUMBER(CROSS(DEA,DIF),DEA*1.1,REF(红面积,1)),COLORLICYAN;
DRAWNUMBER(DIF>DEA,MACD,BARSLAST(CROSS(DIF,DEA))+1),COLORWHITE;
DRAWNUMBER(DIF<DEA,MACD,BARSLAST(CROSS(DEA,DIF))+1),COLORGREEN;
;