Bollinger Bands Width with Alerts
Jan 30, 2018

The Bollinger Bands Width with Alerts indicator measures the percentage difference between the upper and lower Bollinger Bands to visualize volatility cycles and provide automated notifications for momentum shifts.
Usage
The Bollinger Bands Width (BBW) is primarily used to identify periods of high and low volatility. When the BBW value is low, it indicates a "squeeze," often preceding a significant price breakout. Conversely, high BBW values suggest a period of high volatility that may be nearing exhaustion.
This tool includes built-in alerts to assist traders in identifying these turning points:
- BBW has rounded: Triggered when the width starts to decrease after a period of rising, suggesting volatility is peaking or contracting.
- BBW started rising: Triggered when the width begins to increase after a period of falling, suggesting a potential expansion in volatility or the start of a new trend.
For best results and to avoid false signals, it is recommended to use these alerts with the "Once per Bar Close" setting.
Details
The indicator calculates the standard Bollinger Band components: a simple moving average (basis) and standard deviation bands. The Width is derived using the formula:
BBW = (Upper Band - Lower Band) / Basis
By normalizing the distance between the bands relative to the average price, the tool allows for volatility analysis that is consistent across different price levels. The alerts are programmed to detect changes in the slope of the BBW line over a two-bar lookback period.
Settings
- Length: Defines the lookback period for the Simple Moving Average and the Standard Deviation calculation (default is 20).
- Source: Determines which price data is used for the calculations (default is Close).
- Multiplier: Sets the number of standard deviations for the bands, which directly impacts the scale of the width (default is 2.0).
FAQ
How do I access Bollinger Bands Width with Alerts?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What does it mean when the BBW is "rounding"?
Rounding indicates that the gap between the Bollinger Bands has stopped expanding and is now beginning to contract, often signifying a decrease in market momentum or the start of a consolidation phase.
Why should I use the "Once per Bar Close" alert setting?
Using "Once per Bar Close" ensures that the alert condition is confirmed by the final price of the candle, preventing "repainting" or premature triggers caused by intra-bar price fluctuations.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.