/ _SECTION_BEGIN("MACD"); SetChartBkColor( ParamColor("background",colorBlack) ); A1=EMA(C,12)-EMA(C,26); BBtop=BBandTop(A1,10,1); BBbot=BBandBot(A1,10,1); Color=IIf(a1<0 AND a1>Ref(a1,-1), colorLime,IIf(a1>0 AND a1>Ref(a1,-1),colorBrightGreen,IIf(a1>0 AND a1<ref(a1,-1),colorcustom12,colorred))); plot(a1,"macd",color,styledots+styleline);="" plot(bbtop,"bbtop",colorgreen,styledashed);="" plot(bbbot,"bbbot",colorred,styledashed);="" plot(0,"",31,1);="" _section_end()