Volume Adaptive Bollinger Bands (MZ VABB)

MightyZinger Pro Uppdaterad   
This indicator is a functional enhancement to John Bollinger's Bollinger Bands . I've used Volume to adapt dynamic length which is used in basis (middle line) of Bollinger Bands and Simple Moving Average is replaced with Adaptive Ehlers Deviation Scaled Moving Average (AEDSMA).


Bollinger bands are popular among traders because of their simple way to detect volatility in market and redefine support and resistance accordingly. These are some basic usages of original Bollinger Bands:
Among all the usages there are some limitations as follows:
  • Original Bollinger Bands use 20 period Simple Moving Average as Basis which itself restricted to some number of data pints and if market moves in one direction or simply goes sideways for long time; candles can stay on either bands for long time. This gives benefit for staying in directional trade but will completely nullify the use of both bands as support and resistance .
  • Above point simply be explained as markets can stay overbought / oversold for long time and one way to make Bollinger Bands more useful is to simply use higher periods in SMA but as we know with higher periods SMA becomes more laggy and less adaptive.
  • Most traders use BBs alongside some other Volume Oscillator for example "On Balance Volume" but that does solve BBs limitations issue that it should be more adaptive to detect volatility in market.


  • Best way to make original Bollinger band more adaptive was to just use dynamic length instead on constant 20 period. This dynamic length had to be based on some other powerful parameter which can't be volatility as BB itself is a volatility indicator and adapting its length based volatility would have been superimposing volatility on Bollinger bands giving unrealistic results.
  • For adaptive length, I tried using Volume and for this purpose I used my Relative Volume Strength Index "RVSI" indicator. RVSI is the best way to detect if Volume is going for a breakout or not and based on that indication length of Bollinger Band Basis Moving Average changes.
  • RVSI breaking above provided value would indicate Volume breakout and hence dynamic length would accordingly make Bollinger band basis moving average more over fitted and similarly standard deviation of achieved dynamic length would give better bands for support and resistance . Similar case would happen if Volume goes down and dynamic length becomes more underfit.
  • According to my back testing studies I found that Simple Moving Average wasn't the best choice for dynamic length usage in Bollinger Band Basis. So, I used Adaptive Ehlers Deviation Scaled Moving Average (AEDSMA) which is more adaptive and already modified to adapt with RVSI.


  • Volume Adaptive Bollinger Bands are more reactive to market trends so, I used slope for trend strength detection.
  • If slope of Volume Adaptive Bollinger Band Basis (i.e. AEDSMA), Upper and Lower Bands is supporting a trend at same time then script will provide signal in that direction. That signal can also use Volume as confirmation if Bollinger Bands trend direction is supported by Volume or not.


I’ve used dynamic coloring in Basis (AEDSMA) to identify trends with more detail which are as follows:
  • Lime Color: Slope supported Strong Uptrend also supported by Volume and Volatility or whatever you’ve chosen from both of them.
  • Fuchsia Color: Weak uptrend only supported by Slope or whatever you’ve selected.
  • Red Color: Slope supported Strong Downtrend also supported by Volume and Volatility or whatever you’ve chosen from both of them.
  • Grey Color: Weak Downtrend only supported by Slope or whatever you’ve selected.
  • Yellow Color: Possible reversal indication by Slope if enabled. Market is either sideways, consolidating or showing choppiness during that period.


  • Green Circle: Market good for long with support of Volume and Volatility or whatever you’ve chosen from both of them.
  • Red Circle: Market good to short with support from Volume and Volatility or whatever you’ve chosen from both of them.
  • Flag: Market either touched upper or lower band and can act as good TP and warning for reversal.


I’ve included Fibonacci multiple bands which would act as good support/resistance zones. For example, 0.618 Fib level act as good local support and resistance in both upper and lower zones. Fibonacci values can be modified but should be lower than 1.


  • I’ve set default Minimum length to 50 and Maximum length to 100 which I’ve found works best for almost all timeframes but you can change this delta to adapt your timeframe accordingly with more precision.
  • Dynamic length adoption is enabled based on Volume only but volatility can be selected which is already explained above.
  • Trend signals are enabled based on Slope and Volume but Volatility can be enabled for more precise confirmations.
  • In “RVSI” settings "Klinger Volume Oscillator" is set to default but others work good too especially Volume Zone Oscillator. For more details about Volume Breakout you can check “MZ RVSI Indicator".
  • ATR breakout is set to be positive if period 14 exceeds period 46 but can be changed if more adaption with volatility is required.
  • EDSMA super smoother filter length is set to 20 which can be increased to 50 or more for better smoothing but this will also change slope results accordingly.
  • EDSMA super smoother filter poles are set to 2 because found better results with 2 instead of 3.


So far, I've achieved better results with "Klinger Volume Oscillator" in RVSI but TFS Volume Oscillator and On Balance Volume can be used which would change dynamic length differently. It doesn't mean that results would be wrong with some oscillator and precise with others but every oscillator works in its specific way for and RVSI just detect strength of Volume based on provided oscillator.
Release Notes: Updated Chart

Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?