Explainers / Squeeze Momentum
Squeeze Momentum Indicator by LazyBear, explained from its source
LazyBear's Squeeze Momentum Indicator is one of the most-used free scripts on TradingView. It draws two things: a row of dots on the zero line, and a coloured histogram. This page explains both from the published source code, including one detail most guides miss: one of its settings is never used.
What the dots mean
The dots compare two bands drawn around a 20-bar average of the close.
- Bollinger Bands are the average plus and minus a multiple of the standard deviation of the close.
- Keltner Channels are the same average plus and minus a multiple of the average true range. In this script that is a simple average of true range over 20 bars, not Wilder's ATR.
The dot colour tells you how they sit:
- Black: the Bollinger Bands are inside the Keltner Channels on both sides. This is the "squeeze": volatility measured by standard deviation is small compared with the bar ranges.
- Gray: the Bollinger Bands are outside the Keltner Channels on both sides. The squeeze has "fired", or never formed.
- Blue: neither. One band is inside and the other is outside.
The setting that does nothing: BB MultFactor
The settings show "BB MultFactor 2.0" and "KC MultFactor 1.5". In the code, the Bollinger width is calculated with the KC multiplier:
Bollinger width = 1.5 x standard deviation (KC MultFactor), not 2.0 x (BB MultFactor)
So the BB MultFactor input is declared and never read. Set it to 1, 2 or 5 and the chart does not change. Changing KC MultFactor moves both bands at once.
Why it matters: the classic squeeze idea compares 2-standard-deviation Bollinger Bands with 1.5-ATR Keltner Channels. With 1.5 standard deviations the Bollinger Bands are narrower, so they fit inside the Keltner Channels far more often.
On SPY daily bars from 2010 to October 2026:
- As coded, the squeeze was "on" on 35% of bars, in 160 separate squeezes with a median length of 7 bars.
- With the 2.0 multiplier the settings imply, it was on for 10% of bars, in 89 squeezes with a median length of 3 bars.
Same chart, same rule as written in the settings, about three and a half times as many black dots. Neither version is "right", but you should know which one you are looking at. If you want the 2.0 behaviour, you need a version of the script that actually uses its BB setting.
What the histogram measures
The histogram is not the squeeze. It is a separate momentum line:
- Take the midpoint of the 20-bar highest high and lowest low.
- Average that with the 20-bar simple average of the close.
- Subtract the result from the close.
- Fit a straight line through the last 20 values of that difference and take the line's value at the current bar.
value = linear regression end value over 20 bars of ( close - average( Donchian midline, SMA(close) ) )
In plain terms it is how far price sits above or below its recent middle, smoothed by a regression line. On SPY daily it moved together with the plain 20-bar change in price (correlation 0.90). The colours only say whether it is above or below zero and whether it rose or fell since the last bar: bright green rising above zero, dark green falling above zero, red falling below zero, maroon rising below zero.
Note that "KC Length" also sets the momentum length. "BB Length" only changes the Bollinger Bands.
Does Squeeze Momentum repaint?
Not on closed bars. Every value uses the current and past bars only. There is no higher-timeframe request and no future data.
The live bar does change until it closes. A black dot or a colour change you see mid-bar can disappear before the close. If you set an alert on it, set it to trigger once per bar close. The original script has no built-in alerts, so most alert setups people share are custom.
Settings, honestly
There is no "best" setting. What each one does:
- BB Length (20): the window of the Bollinger Bands only.
- BB MultFactor (2.0): unused, see above.
- KC Length (20): the Keltner window and the momentum window.
- KC MultFactor (1.5): the width of both the Keltner Channels and the Bollinger Bands.
- Use TrueRange (on): off uses high minus low, which ignores gaps.
Shorter lengths react faster and produce more squeezes and more zero-line crosses. Longer lengths do the opposite. Neither tells you which way a squeeze will resolve.
Where it fails
- A squeeze says volatility is low, not which way it will break. The dots carry no direction. The histogram's sign at the moment of release is a reading of the last 20 bars, not of the next ones.
- Squeezes can end with no move at all. Low volatility can simply continue, or price can drift out of the squeeze sideways.
- The count depends on the hidden 1.5. Comparing squeeze statistics from this script with a TTM-style 2.0 version compares two different rules.
- The histogram lags. It is built from 20-bar windows, so it confirms moves that are already underway.
- Gaps and thin markets distort the true-range average and the standard deviation differently, so dot colour can flip on a single unusual bar.
Also explained
Educational content only. Not financial advice. Nothing here is a recommendation to buy or sell anything. Original script by LazyBear on TradingView; this page explains its published source and quotes no code.
Also explained: Repaint checker, VWAP, Supertrend, RSI, UT Bot Alerts, Nadaraya-Watson Envelope, What is repainting on TradingView?, Is TradingView backtesting accurate?, Chandelier Exit, WaveTrend Oscillator, QQE MOD, Pivot highs and lows, Hull Suite, Range Filter, Twin Range Filter, HalfTrend, ZigZag++, SSL Hybrid, CM MacD Ultimate MTF, Volume Profile / Fixed Range, ADX and DI, Support Resistance Channels, Market Structure Break & Order Block, Order Block Finder, Pivot Point SuperTrend, Trendlines with Breaks [LuxAlgo], Divergence for Many Indicators, TradingView script selling terms, Support and Resistance Levels with Break, Liquidity Swings [LuxAlgo], Pine Script errors, Breakout Probability (Expo), Did ChatGPT or Claude write your Pine Sc, Lorentzian Classification, SuperTrend AI (Clustering), Machine Learning Adaptive SuperTrend, Dynamic Swing Anchored VWAP, Support and Resistance Power Channel by , Support and Resistance (High Volume Boxe, Trendline Breakouts With Targets by Char, Breakout Finder by LonesomeTheBlue
Get the next teardown by email
One short email when a new teardown or free tool goes live, about twice a month. No signals, no hype. Unsubscribe in one click.
Almost done. Check your inbox and click the confirmation link.
Sent with Kit. Your address is used only for these emails. Privacy
No TradingView account yet? This affiliate link gives you a $15 coupon toward a paid plan, and we earn a commission if you buy one. The free plan is enough to follow this page.