All indicators

Bollinger Bands w/ Squeeze Alert

Jun 19, 2021

Static chart image
Support and ResistanceSignalsMoving AveragesVolatility

The Bollinger Bands w/ Squeeze Alert indicator identifies periods of extreme low volatility by detecting Bollinger Band "Squeezes" based on historical BandWidth comparisons.

Usage

The indicator functions as standard Bollinger Bands with the added benefit of visual alerts for volatility extremes. A "Squeeze" occurs when the current BandWidth reaches its lowest point over a specified look-back period (defaulting to 125 bars, representing roughly six months on a daily chart).

  • Squeeze Detection: When a squeeze is detected, the background fill of the bands turns red, signaling a potential breakout as volatility often expands following a contraction.
  • Bulge Detection: If enabled, the indicator can also highlight a "Bulge," representing high volatility relative to the look-back period, characterized by a green background fill.
  • Trend Analysis: Users can utilize the basis (middle line) for trend direction and the upper/lower bands as dynamic support and resistance levels during non-squeeze periods.

Details

The script calculates volatility using the standard Bollinger BandWidth formula. The core logic follows John Bollinger's definition of a squeeze as the lowest volatility seen in the last six months.

In addition to the standard calculation, the script includes a "complicated" mode. This mode incorporates an additional volatility threshold by checking if the standard deviation of the price is below the lower band of its own historical volatility range. This provides a multi-layered approach to identifying deep contractions in market price action.

Settings

  • Length: The period used to calculate the moving average (basis) and standard deviation for the bands.
  • Source: The price data used for calculations (typically "Close").
  • StdDev: The multiplier for the standard deviation to determine the width of the bands.
  • Offset: Shifts the Bollinger Bands forward or backward on the x-axis.
  • Back comparison period for squeeze detection (bars): The look-back window used to find the lowest/highest BandWidth values (default is 125).
  • Use complicated version: Enables an alternative squeeze detection method based on secondary volatility calculations.
  • Show Bulge: Toggles the visualization and detection of high-volatility "Bulges."

FAQ

How do I access Bollinger Bands w/ Squeeze Alert?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What does the red background indicate?

The red background indicates a Squeeze, meaning the current volatility is at its lowest point relative to the specified look-back period.

Can I set alerts for breakouts?

Yes, the script includes built-in alert conditions that trigger when a Squeeze or a Bulge begins, allowing you to monitor for potential price expansions.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.