difF:ema(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MacD:2*(DIFF-DEA), COLORSTICK,LINETHICK4;
STICKLINE(macd<REF(MACD,1)AND MACD>0,0,MACD,0.9,0),COLORBLUE;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,0.9,0),COLORCYAN;
STICKLINE(MACD>REF(MACD,1)AND MACD,0,MACD,0.9,0),COLORYELLOW;
STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,0.9,0),COLORWHITE;