Bollinger Bands Width

 
Hi I'm looking for someone who can adapt the code for the standard Bollinger Band into something new:

I need an oscillator on the bottom of my chart which gives a line-graph of the Band width (not a histogram as you can find on some websites, but a clear single black line) and

BandWidth = (Upper Bollinger Band - Lower Bollinger Band) / Middle Bollinger Band

and Middle Bollinger Band = 20-period simple moving average
Upper Bollinger Band = Middle Bollinger Band + 2 * 20-period standard deviation
Lower Bollinger Band = Middle Bollinger Band - 2 * 20-period standard deviation

Basically all you need to do is adapt the Custom Indicator called "Bands" which comes with the software.
Standard settings work best: 20 period MA and 2 standard deviations.

The cool thing about it is that you'll more easily see volatility contractions and you can trade the Bollinger squeeze in a more visual way than when you're just using the bands instead of the bandwidth.

Thanks for the help !!

cfr: "Bollinger Bands — BB"
 
Try to refer to community at https://www.mql5.com/en/forum
Reason: