Bollinger squeeze strategy: Bands inside Keltner Channels

By Oalgo · Last reviewed

A squeeze is a quiet stretch in which the Bollinger Bands pull inside the Keltner Channels. A squeeze strategy waits for it to end and acts when price moves out. The squeeze says that price has been calm. It does not say which way the next move goes, so the rule needs a second condition for direction. The Bollinger Bands strategy page has a squeeze rule that uses the width of the bands alone.

Chart: example prices with the Keltner Channels as solid lines and the Bollinger Bands as thin dashed lines. The stretches where the dashed bands lie inside the solid channels are shaded. In the second shaded stretch the Bollinger Bands are about 8 apart and the Keltner Channels about 20.PriceKeltner upperKeltner lowerBollinger upperBollinger lowerSqueeze on
Example prices, made up for this page. Both with 20 candles; Bollinger Bands with 2 deviations, Keltner Channels with a multiplier of 2.

How is a squeeze found?

#
  • The squeeze is on when the Bollinger upper line is below the Keltner upper line and the Bollinger lower line is above the Keltner lower line.
  • It happens when closes stay close together while candles keep their usual size. Bollinger Bands measure how far the closes spread, and Keltner Channels use ATR, which includes highs, lows and gaps.
  • Settings: 20 candles for both, 2 deviations for the Bollinger Bands and a multiplier of 2 for the Keltner Channels. People often use a smaller Keltner multiplier such as 1.5. It narrows the channels, so fewer candles count as a squeeze.

What does a worked example look like?

#
Made-up candle, middle line 100Bollinger BandsKeltner ChannelsSqueeze
Quiet: deviation 1.5, ATR 2.5100 ± 2 × 1.5, so 97 to 103100 ± 2 × 2.5, so 95 to 105On: both Bollinger lines are inside
After a large candle: deviation 3, ATR 2.5100 ± 2 × 3, so 94 to 10695 to 105Off: both Bollinger lines are outside

The ATR is held at 2.5 to keep the numbers simple. In real prices a large candle raises the ATR too, so the channels widen as well.

On the example prices the bands are inside the channels for 14 candles in a row in each of the two longest stretches (candles 44 to 57 and 75 to 88). After the first stretch price closed at 106.07 on its last candle and at 115.0 four candles later. After the second it closed at 100.74 and at 95.28 four candles later. The squeeze looked alike both times, and the next move went in opposite directions.

What are the rules of a squeeze strategy?

#
  • Squeeze on: the Bollinger upper line is below the Keltner upper line and the Bollinger lower line is above the Keltner lower line, for example for 6 candles in a row.
  • Release: the Bollinger upper line crosses back above the Keltner upper line. The bands have left the channels on the upper side.
  • Direction: the close is above the Keltner middle line for a long entry. The squeeze gives none, so this condition is the rule's only view on direction.
  • Exit: the close falls below the Keltner middle line.
  • Stop: a Stop Loss as a percentage.

How do you write this strategy in Oalgo?

#

In Oalgo you can tell Oalgo AI your squeeze rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.

For example, you could tell Oalgo AI: "Enter when the Bollinger upper line (20 candles, 2 deviations) crosses above the Keltner upper line (20 candles, multiplier 2) and the close is above the Keltner middle line. Exit when the close falls below the Keltner middle line. Use a 2% Stop Loss and a 4% exit target." These numbers are examples to change. In the builder a Crosses block takes the two upper lines, and an AND block joins it with a Compare block for the middle line. A Live Strategy needs a stop on each side it can enter, and an exit target is optional. The example names both.

That rule looks at the upper side only, and it does not check how long the squeeze lasted. Blocks can test that a squeeze is on now, with two Compare blocks and a Consecutive block for a number of candles in a row. They cannot ask whether it was on until the candle before. For that you can ask Oalgo AI to build a squeeze indicator that marks the candles where a squeeze has just ended, and a rule can use that mark.

How do you test this strategy honestly?

#
  • Run a backtest on a quiet stretch and on an active one. A squeeze rule has nothing to do in an active one.
  • Test the direction condition on its own. The squeeze gives no direction, so that condition decides what the rule does.
  • Try other Keltner multipliers, for example 1.5, 2 and 2.5, and see how many squeezes and trades each one gives.
  • Run a forward test on new prices, with simulated funds.

What can a squeeze not tell you?

#

A squeeze says that recent closes were close together compared with the size of the candles. It does not say how long it will last, whether a move will follow, or which way. The release can also come after much of the move: on the example prices the upper line crosses out at candle 60, when the close is 111.48, 5.1% above the last squeeze candle. And no squeeze can show until there are 20 candles of history for both indicators.

Read next