%b
%B is a popular technical indicator developed by John Bollinger that measures the relative position of the closing price within the Bollinger Bands. When combined with Amibroker data and Amibroker AFL, it becomes a powerful tool for traders to identify potential reversals and breakouts in the market. Stay ahead of trends and make informed trading decisions with the help of %B and Amibroker tools.
P = ParamField("Price field",-1); Periods = Param("Periods", 20, 2, 300, 1 ); Width = Param("Width", 2, 0, 10, 0.05 ); BBW = BBandTop(P, 20, 2) - BBandBot(P, 20, 2); b = (P - BBandBot(P, 20,2))/ BBW; Plot(b, "%b("+Periods+", "+Width+")", ParamColor("color", colorCycle ), ParamStyle("Style") ); PlotGrid(0.5, colorLightGrey); PlotGrid(0, colorLightGrey); PlotGrid(1, colorLightGrey);