Squeeze Breakout using BB and KC [v1.0]

Mar 6, 2020

Static chart image
Price Action Based
Volume Based
Signals
Moving Averages
Volatility

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 access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.