What it measures
Momentum Squeeze answers two separate questions in one oscillator pane: is price coiled tight, and which way is it leaning?
- The squeeze. Over the last
lengthbars it compares two widths: two standard deviations of the close (the Bollinger Band width) andkeltner_multiplier × ATR(length)(the Keltner Channel width, with Wilder's ATR). When the Bollinger width is at or below the Keltner width, closes are packed tighter than the stock's normal bar range, and the squeeze is on. This is the classic "Bollinger Bands inside Keltner Channels" test with both bands centered on the same average, written as one comparison. - The momentum. The histogram is the close's distance from its
length-bar simple moving average, smoothed by a linear regression over the lastlengthbars. Above zero, price has been running above its average; below zero, under it.
| Output | Meaning |
|---|---|
momentum | The histogram value, in price units |
squeeze_state | 1 while the squeeze is on, 0 on the first bar after it ends, -1 otherwise |
On the chart, histogram bars are green above zero and red at or below it. Above zero, a bar is solid when it is higher than the bar before and faded when it is lower; below zero, solid when lower and faded when higher. Squeeze marks sit on the zero line in amber: a short thick tick on every bar while the squeeze is on, and a small hollow box on the bar it releases.
With the default length of 20, the squeeze marks start after 22 bars of history and the histogram after 39 (a 20-bar average, then a 20-bar regression of it).
How to read it
- A run of amber ticks. Volatility has contracted: recent closes have stayed close together compared with the typical bar's range. Squeezes often come before a larger move, but the indicator does not say when or in which direction.
- The hollow box. The first bar after the squeeze ends, when closes spread back out past the Keltner width. This is the "squeeze fired" bar many traders watch.
- The histogram at the release. Gives the lean: above zero and rising points up, below zero and falling points down. Many traders wait for price to break out in the same direction before acting.
- Faded bars. After a strong run, faded bars mean momentum is easing while still on the same side of zero, often before the histogram crosses zero.
Compared with other squeeze indicators
John Carter's TTM Squeeze popularized the idea of a Bollinger-inside-Keltner squeeze paired with a momentum histogram. Momentum Squeeze is StockVyze's own version: one length drives every part, there is one squeeze level, and momentum is a regression of the close minus its moving average. Squeeze periods should be similar to other 20-bar, 1.5-ATR squeeze indicators, but exact on and off bars and histogram values can differ, because each one averages true range and measures momentum slightly differently.
Tuning
length(default20) sets the window for all four calculations: standard deviation, ATR, the moving average and the regression. A shorter length reacts faster, so squeezes come and go more often.keltner_multiplier(default1.5, range1.0to2.0) sets how tight closes must be to count as a squeeze. Lower values flag only very tight compression;2.0also flags milder ones. The Bollinger width stays at two standard deviations.
Common mistakes
- Reading the squeeze as a direction. A squeeze only says volatility is compressed. The move out of it can go either way.
- Comparing histogram values across stocks. Momentum is in price units, so a $500 stock shows bigger bars than a $20 stock making the same percentage move. Compare a stock with its own history.
- Trusting the bar in progress. The latest bar updates as it trades. A squeeze can start, end or release during the session and change again before the close.
- Acting on every release. A squeeze that lasts only a bar or two releases often, and many of those releases go nowhere.
Use it in a scan
The same calculation works as a scan formula. Stocks in a squeeze on the default settings:
atr(20) > 0 and 2 * stddev(c, 20) <= 1.5 * atr(20)
The squeeze released on the latest bar with momentum above zero:
2 * stddev(c, 20) > 1.5 * atr(20) and (atr(20) > 0 and 2 * stddev(c, 20) <= 1.5 * atr(20))@1 and linreg(c - sma(c, 20), 20) > 0
Still in a squeeze, with momentum rising:
atr(20) > 0 and 2 * stddev(c, 20) <= 1.5 * atr(20) and linreg(c - sma(c, 20), 20) > (linreg(c - sma(c, 20), 20))@1
The built-in squeeze keyword uses default Keltner Channel settings (an EMA center and 2 × a 10-bar average true range), so it can flag different bars than this indicator. Use the formulas above to match the chart.
Inputs
| Input | Type | Default | Range |
|---|---|---|---|
length | integer | 20 | 5 – 100 |
keltner_multiplier | number | 1.5 | 1 – 2 |
Outputs
momentum, squeeze_state
