DIF:EMA(CLOSE,12) - EMA(CLOSE,26),COLOR33FF33,LINETHICK2;
DEA:EMA(DIF,9),COLORYELLOW,LINETHICK2;
MACD:2*(DIF-DEA),COLORSTICK;
DRAWBAND(DIF,RGB(158,50,50),DEA,RGB(83,123,68));
短線只做紅柱柱:DIF>DEA AND MACD>REF(MACD,1),COLORRED,NODRAW;
中線只做暖色帶:MACD=0,COLORCC66FF;
STICKLINE(MACD>0,0,MACD,1,0),COLORRED;
STICKLINE(MACD>0 AND MACD
STICKLINE(MACD
STICKLINE(MACDREF(MACD,1),0,MACD,1,0),COLORFF00FF;
IF(DIF
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORMAGENTA,LINETHICK3;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DIF,2);
DRAWICON(CROSS(DIF,0),DEA,9);
DRAWICON(CROSS(0,DIF),DIF,6);
買:=CROSS(DIF,DEA);
逃:=CROSS(DEA,DIF);
DRAWTEXT(買,DIF+0.02,'買'),COLORWHITE;
DRAWTEXT(逃,DEA+0.02,'逃'),COLORYELLOW;