Skip to main content

JASmith's Bollinger bands width-ratio for Amibroker (AFL)

jasmith almost 13 years ago Amibroker (AFL)

  • Rating:
    2 / 5 (Votes 3)
  • Tags:
    amibroker

Plots ratio of width of bollinger bands to an MA with the same period. Very useful indicator of price volatility and trend. Low values indicate low absolute volatility. Sustained high values usually indicate a strong trend.

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("BB Width Ratio");
Price = ParamField("Price", 4);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorRed );

bbt = BBandTop( Price , Periods, Width ); 
bbb = BBandBot( Price , Periods, Width );
bbWidthRaio = (bbt-bbb)/MA(Price, Periods);
Plot(EMA(bbWidthRaio,3), _DEFAULT_NAME(), colorRed);
_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.