A squeeze happens when realized volatility (Bollinger) compresses below ATR-based volatility (Keltner) - the Bollinger bands literally fit inside the Keltner channels. Compressed periods often precede directional moves; the squeeze flag is the trigger to start watching.
Formula
squeeze_on = (bb_lower > kc_lower) AND (bb_upper < kc_upper)
momentum = (close - midline) / atr (with a smoothing step)The momentum column is a directional read: positive while price
sits above the midline, negative below. Some traders use the
momentum slope to time the breakout direction.
Params
Multiple Bollinger + Keltner params; the LucraX defaults are
bb_period=20, bb_std=2.0, kc_period=20, kc_mult=1.5.
Output
Two columns:
{name}_squeeze_on- boolean (true while compressed){name}_momentum- directional momentum value
Usage
- Watch + breakout: wait for
squeeze_onto flip from true to false, then take a position in the direction the momentum is pointing. - Skip filter: don't enter trend trades while
squeeze_onis true - the market isn't moving yet. - Multi-timeframe: a daily squeeze that releases into an intraday breakout is a high-confidence setup.
Pitfalls
- A squeeze can last many bars before it releases. The strategy needs patience or it'll get bored and miss the actual move.
- Squeezes don't predict direction. They predict that movement is coming. The momentum column or a separate trend filter has to pick the side.
