+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

MACD BB

The MACD BB AFL combines the MACD indicator with Bollinger Bands to identify potential buy or sell signals. By utilizing Amibroker data feed, this AFL calculates the MACD values and overlays them with Bollinger Bands, offering insights into market volatility and potential price reversals.

/
_SECTION_BEGIN("macd BB");

 
A2=MACD(3,34); 
BBtop=BBandTop(A2,5,.5);  
BBbot=BBandBot(A2,5,.5);
Color=IIf(a2 > bbtop, colorBlue,IIf(a2 < bbbot, colorRed,colorYellow));
bbtop_col = IIf (BBtop > Ref(BBtop,-1),colorBlue,colorRed);
bbbot_col = IIf (BBbot > Ref(BBbot,-1),colorBlue,colorRed);
Plot(a2,"",color,styleLine);
Plot(BBtop,"",BBtop_col,styleDashed);
Plot(BBbot,"",BBbot_col,styleDashed);
Plot(50,"",31,1);
Buy = a2 > bbtop;
Sell = a2 < bbbot;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

PlotShapes(Buy*shapeHollowSmallUpTriangle,colorYellow);
PlotShapes(Sell*shapeHollowSmallDownTriangle,colorYellow);
Plot(6, "", Color, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
_SECTION_END();  

Open chat
1
Hi, how can I help you?