All indicators

Bollinger Bands with Squeeze highlighting

Apr 7, 2018

Static chart image
SignalsMoving AveragesVolatility

The Bollinger Bands with Squeeze highlighting indicator identifies periods of low market volatility by visually highlighting the Bollinger Band bands when the bandwidth reaches significant lows.

Usage

The indicator can be used to identify potential breakout opportunities by monitoring the "squeeze" phase of the Bollinger Bands. When the market consolidates and volatility drops, the bands contract, often preceding a sharp price movement.

The tool provides two levels of visual highlighting within the band fill:

  • Yellow Highlighting: Occurs when the Bollinger Bandwidth (BBW) falls below a user-defined threshold.
  • Green Highlighting: Occurs when the BBW reaches its lowest point over a specified lookback period (e.g., 180 bars), indicating an extreme squeeze.

Standard blue coloring is maintained when the bandwidth is outside these specific squeeze conditions. Users can utilize the built-in alerts to be notified when a squeeze begins or ends.

Details

The indicator calculates standard Bollinger Bands using a Simple Moving Average (SMA) and a standard deviation multiplier. The "Squeeze" is determined by calculating the Bollinger Bandwidth (BBW), which is the difference between the upper and lower bands normalized by the basis line.

The primary logic compares the current BBW to its historical values using the ta.lowest function. A squeeze is defined as being "active" when the current bandwidth is lower than the lowest value found in the previous $n$ periods, signifying a period of relative volatility compression not seen in recent history.

Settings

  • Source: The price data used for the Bollinger Band calculations (default is Close).
  • Highlight BBW under: The specific bandwidth value below which the bands will turn yellow.
  • Lowest Length: The lookback period used to determine if the current bandwidth is at a multi-period low.
  • Bollinger Band Length: The period used for the SMA basis and standard deviation.
  • Bollinger Bands Standard Deviation: The multiplier for the standard deviation that determines the width of the bands.

FAQ

How do I use the squeeze highlights for trading?

The squeeze highlights indicate low volatility; traders often wait for the bands to "fire" (expand) and for price to break out of the bands as a signal of a new trend starting.

Can I change the sensitivity of the squeeze detection?

Yes, by adjusting the "Lowest Length" or the "Highlight BBW under" settings, you can make the indicator more or less sensitive to volatility changes.

How do I access Bollinger Bands with Squeeze highlighting?

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

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.