All indicators

Bollinger Bands With Squeeze

Feb 6, 2021

Static chart image
ChannelsMoving AveragesVolatility

The Bollinger Bands With Squeeze indicator is a technical analysis tool designed to identify periods of low volatility (squeezes) and extreme overbought/oversold price conditions through dynamic color changes.

Usage

The indicator visualizes Bollinger Bands with specific color states to help traders interpret market volatility and trend strength.

  • The Squeeze: When the bands contract (specifically when the ratio of the Bollinger Band width to a Keltner-style ATR channel is less than 1), the bands and background change to a specific squeeze color (blue). This indicates a period of consolidation, often preceding a significant breakout or breakdown.
  • Trend Riding: When the price closes outside the bands (Percent B > 1 or < 0), the bands change color to green (bullish ride) or red (bearish ride). This highlights strong momentum where the price "rides" the bands in an overbought or oversold state.
  • Neutral State: When volatility is normal and price is within the bands, the indicator displays a neutral color.

Details

The script calculates standard Bollinger Bands using a simple moving average (SMA) and standard deviation. It enhances the standard calculation by incorporating two additional logical layers:

  1. Squeeze Logic: It compares the standard deviation to a Keltner-derived factor (ATR * 1.5). If the Bollinger Band width is narrower than the Keltner factor, a squeeze is identified. It also checks the Commodity Channel Index (CCI) to differentiate between squeeze states.
  2. Band Riding Logic: It utilizes a "Bollinger Band Ratio" (Percent B) calculation to detect when price exceeds the upper or lower boundaries.

Settings

  • Length: Sets the lookback period for the SMA and Standard Deviation calculations (default is 20).
  • Source: Determines the price data used for calculations (default is Close).
  • StdDev: Adjusts the multiplier for the standard deviation, controlling the width of the bands.
  • Offset: Shifts the Bollinger Bands forward or backward in time on the chart.

FAQ

How do I identify a potential breakout? A potential breakout is signaled when the bands turn blue, indicating a squeeze. A transition from blue back to a neutral or "riding" color typically signifies the start of the price move.

What does it mean when the bands turn green? Green bands indicate that the price is currently trading above the upper Bollinger Band, showing strong bullish momentum or an overbought "band ride" condition.

How can I access the Bollinger Bands With Squeeze? 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.