Skip to main content

Bollinger Bandwidth for Amibroker (AFL)

buvanes19891989 almost 16 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 2)
  • Tags:
    amibroker, bollinger

Developed by John Bollinger. Creator of Bollinger Bands. used to identify period of low volatility

Screenshots

Indicator / Formula

Copy & Paste Friendly
//  Formula Name:    Bollinger Bandwidth
//  Author/Uploader: Buvanes					 
//  E-mail:          buvanes1989@gmail.com	
//  Date/Time Added: 15.0.2010 12:45:00
//  Origin:          Translated from the "Bollinger on Bollinger" by Dennis Skoblar
//  Keywords:        Bollinger

//volatility is plotted on a percentage basis. Used for trading system
//volatility should be compared on a relative basis not on 
//absolute basis. A six month low should be taken as a period of extreme low volatility
//according to bollinger. THen a breakout can be traded with the help of bollinger band.
//however u can backtest according to your wish
_SECTION_BEGIN("Bollinger Bandwidth");
a1=Param("period",20,10,50,1,0);
a2=Param("Standard Deviation",2,1.5,2.5,0.1,0);
a3=BBandTop(Close, a1, a2);
a4=BBandBot(Close, a1, a2);
a5=a3-a4;
a6=MA(Close,14);
a7=a5/a6*100;
Plot( a7,"Bollinger Bandwidth",ParamColor( "color", colorCycle ), ParamStyle("Style")  );
_SECTION_END();

1 comments

1. BBands
almost 16 years ago

Just one small correction. In line 19 replace ‘14’ with ‘a1’.

Enjoy,

John Bollinger

Leave Comment

Please login here to leave a comment.