Skip to content
All library documents

Double Bollinger Bands with Bandwidth-Based Trend Coloring

Article ProRealCode

Summary

This visual indicator combines a 20-period moving average and Bollinger Bandwidth with bands at one and two standard deviations. It colors the display bullish when price is above the average and bandwidth is rising, bearish when price is below the average and bandwidth is rising, and neutral otherwise. Candle-like shapes and colored band lines make these states easier to see on a chart.

The document provides indicator logic but no backtest, trade rules, or performance evidence. Its author presents it as a visual aid and cautions that no indicator is a guaranteed solution. The code also defines two sets of one-standard-deviation bands identically, so the displayed inner bands overlap. It does not specify an asset class, timeframe beyond the indicator lookbacks, or how to turn the visual states into entries, exits, or risk controls.

Key ideas

  • Rising Bollinger Bandwidth signals expanding volatility in the indicator’s trend coloring.
  • Price above the 20-period average with rising bandwidth is labeled bullish.
  • Price below the 20-period average with rising bandwidth is labeled bearish.
  • The indicator plots bands at one and two standard deviations around the moving average.
  • The author offers the display as a visual aid rather than a complete or proven trading system.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.