// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("MACD");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
ml = MACD(r1, r2);
dd= Signal(r1,r2,r3);
Plot(ml-dd ,"MACD Histogram",31,styleHistogram);
Plot(ml ,"MACD",colorBlue,styleDots+styleLine);
Hist=ml-dd;
Plot(MA(Hist,1),"",31,styleLine+styleThick);
Color=IIf(ml>0 AND ml>Ref(ml,-1),colorWhite,colorYellow);
Plot(0,"",color,styleLine+styleThick);
Plot( 2, "", IIf(ml>0,colorBlue,colorRed), styleArea | styleOwnScale | styleNoLabel, 0, 100 );
_SECTION_END();

_SECTION_BEGIN("BB");
BBtop=BBandTop(ml,10,1); 
BBbot=BBandBot(ml,10,1);
Plot(BBtop,"BBtop",colorWhite,1+4,styleNoLabel);
Plot(BBbot,"BBbot",colorWhite,1+4,styleNoLabel);
_SECTION_END();