All indicators

Squeeze Breakout using BB and KC [v1.0]

Mar 6, 2020

Static chart image
Price Action BasedVolume BasedSignalsMoving AveragesVolatility

The Squeeze Breakout using BB and KC [v1.0] indicator identifies high-probability volatility breakouts by detecting periods where Bollinger Bands contract within or relative to Keltner Channels. It provides a comprehensive strategy framework for capturing momentum shifts following low-volatility "squeezes."

Usage

This tool is designed to identify "Squeeze" conditions where price is consolidating. A breakout is signaled when the price closes outside of the Bollinger Bands after a period of contraction.

  • Long Entry: Occurs when the price closes above the upper Bollinger Band, provided the squeeze conditions (BB width or BB within KC) are met and optional trend filters (EMA/SMA) are aligned.
  • Short Entry: Occurs when the price closes below the lower Bollinger Band under similar squeeze and trend conditions.
  • Exit Strategy: The script includes a built-in exit mechanism using the 8-period EMA. If price crosses under the 8 EMA during a long trade (or over during a short), an exit is triggered. It also features a stop loss based on the Bollinger Band basis (middle line).

Details

The indicator combines two classic volatility envelopes:

  1. Bollinger Bands (BB): Used to measure standard deviation-based volatility.
  2. Keltner Channels (KC): Used to measure ATR-based volatility.

The "Squeeze" is defined by two optional methods in this script. The first is a width-based check where the BB width must be less than a multiple of the ATR. The second is a positional check where the Bollinger Bands must be physically tucked inside the Keltner Channels for a specific duration. This ensures that the subsequent breakout is moving from a state of significantly compressed volatility to expanding momentum.

Settings

Strategy Logic

  • BB Squeeze Check: Enables the volatility squeeze requirement based on Bandwidth.
  • BB Squeeze Width: Sets the threshold for the Bandwidth squeeze relative to ATR.
  • BB within KC Check: Enables the requirement that Bollinger Bands must be inside Keltner Channels.
  • EMA Trend Check: Filters entries based on the alignment of a 5-EMA ribbon (8, 21, 34, 55, 89).
  • 200MA Trend Check: Filters entries to ensure they are taken in the direction of the long-term trend (200 SMA).
  • Average Volume Check: Requires the breakout bar to have volume higher than its recent average.
  • Buy Session: Defines the time window during which new entries are permitted.
  • Exit Intraday?: If enabled, the strategy closes all positions at the end of the specified session.
  • Entry distance from alert: The number of bars the strategy will wait for a price trigger after a signal.

Indicators

  • Show BB/KC/EMA: Toggles the visibility of the Bollinger Bands, Keltner Channels, and various Exponential Moving Averages.
  • BB Length/StdDev: Configures the period and multiplier for the Bollinger Bands.
  • KC Length/Mult: Configures the period and ATR multiplier for the Keltner Channels.
  • ATR Length: Sets the period used for ATR calculations within the KC and Squeeze logic.

FAQ

How do I access Squeeze Breakout using BB and KC [v1.0]?

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

Can I use this for intraday trading?

Yes, the script includes a "Buy Session" input and an "Exit Intraday" toggle specifically designed to manage trades within specific market hours.

What is the default exit signal?

The default exit is a close across the 8-period EMA or a price hit on the Bollinger Band basis line (Stop Loss).

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.