DIF周:=EMA(CLOSE,12*5)-EMA(CLOSE,26*5);
DEA周:=EMA(DIF周,9*5);
MACD周:(DIF周-DEA周),COLORMAGENTA,NODRAW;
DIF日:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA日:=EMA(DIF日,9);
MACD日:(DIF日-DEA日),COLORRED,NODRAW;
STICKLINE(MACD周>=0,0,MACD周,2,1),COLORMAGENTA;
STICKLINE(MACD周< 0,0,MACD周,2,1),COLORFFFF00;
(DIF日-DEA日),COLORSTICK;
STICKLINE(MACD日>REF(MACD日,1) AND MACD周>REF(MACD周,1),0,0.03,9,0),COLORYELLOW;
共振:MACD日>REF(MACD日,1) AND MACD周>REF(MACD周,1),COLORYELLOW,NODRAW;