Modern Squeeze Momentum [GBB]

4 635
MODERN SQUEEZE MOMENTUM [GBB]

A rework of the Squeeze Momentum Indicator with an adaptive length, graded compression, normalised momentum, a qualified-release filter and a higher-timeframe context layer. Classic mode reproduces the original exactly.

The Squeeze Momentum Indicator (LazyBear's open-source implementation of John Carter's TTM Squeeze) is one of the most used free scripts on TradingView, and for good reason: Bollinger Bands inside Keltner Channels is a clean, intuitive way to spot compression before expansion. It also has four well-known limitations:

  1. - The length is fixed at 20 bars regardless of the market's current cycle.
  2. - The squeeze is binary. A hair inside the Keltner Channel counts the same as an extreme contraction.
  3. - Momentum is in price units, so a reading of 15 on gold and 0.0004 on EURUSD tell you nothing comparable, and no fixed threshold works across symbols.
  4. - Every squeeze release fires, whether or not price actually did anything.


This script keeps the original as its base (Layer 0) and adds five layers on top. Each layer has its own on/off switch so you can see exactly what each one changes.

HOW IT WORKS

Layer 0 - Classic base
Bollinger Bands (SMA +/- 2.0 standard deviations) and Keltner Channels (SMA +/- 1.5 x SMA of true range). Momentum is the linear regression of close minus the midpoint of the Donchian midline and the SMA, exactly as in the original.

Layer 1 - Adaptive length
Instead of a fixed 20, the length follows the dominant cycle measured by the Ehlers Homodyne Discriminator on (high + low) / 2. The cycle estimate is smoothed with a short EMA, clamped to a 12-40 bar range, and rounded. All bands and the momentum calculation use this length, so the indicator tightens in fast markets and widens in slow ones.

Layer 2 - Graded compression
The ratio Bollinger width / Keltner width is percentile-ranked over the last 150 bars. Three grades: light (bottom 30%), medium (bottom 15%), tight (bottom 5%). The zero-line dot grows and changes colour with the grade, and a duration counter tracks how many bars the squeeze has lasted. With this layer off, the classic binary test (BB inside KC) is used.

Layer 3 - Normalised momentum
Momentum is divided by the Keltner range, so the histogram is in "Keltner-range units". A reading of 1.0 means the same thing on BTC 1h, gold 15m and EURUSD 1h. Reference lines at +/-0.5 and +/-1.0 are drawn for orientation. The momentum threshold used in Layer 4 is set in the same units.

Layer 4 - Qualified release
A raw release is simply the squeeze ending. A qualified release additionally requires, on the release bar:
- momentum direction agrees with the bar direction (close vs open),
- absolute momentum is at or above the threshold (default 0.5),
- the squeeze lasted at least the minimum number of bars (default 3),
- close breaks the high (long) or low (short) of the range that formed during the squeeze.
Qualified releases are drawn as solid triangles (green up, red down). Unqualified releases are drawn as small grey dots so you can see what the filter removed. Turn the layer off and every release fires, as in the original.

Layer 5 - Context
HTF wash: the full layer stack is evaluated on a higher timeframe (default 4x the chart timeframe, or pick your own). When the higher timeframe is in a squeeze, the pane background is tinted, darker for tighter grades. Only closed higher-timeframe bars are used, lookahead is off. If the chosen HTF is not above the chart timeframe, a label says so and the wash is disabled.

Stats table: running counts on the loaded bars. Number of squeezes, raw vs qualified releases, hit rate (did close move in the release direction after H bars) and range multiple (the H-bar range after a qualified release, in ATR, relative to the H-bar range of all bars). H defaults to 10 bars.


READING THE PANE


  • - Histogram: the four original states are kept. Positive and rising, positive and falling, negative and falling, negative and rising, each in its own colour.
  • - Zero-line dot: small blue-grey = no squeeze; yellow / orange / red and increasingly large = light / medium / tight squeeze.
  • - Triangles: qualified release, long below the histogram, short above.
  • - Grey dots: releases that did not pass the filter.
  • - Background tint: the higher timeframe is in a squeeze.
  • - Reference lines: +/-0.5 and +/-1.0 Keltner-range units (only drawn when Layer 3 is on).


Three palettes: GBB (default), LazyBear (original colours) and Mono.


CLASSIC MODE

One switch in the General group turns Layers 1-4 off, sets the fixed length, and reproduces the original Squeeze Momentum Indicator histogram and squeeze dot. Combine it with the LazyBear palette if you want the familiar look. It is there so you can check for yourself what the added layers do and do not change.


ALERTS

Five alert conditions, all evaluated on confirmed bars only:
  1. - Squeeze started (message includes the grade)
  2. - Squeeze released (raw)
  3. - Qualified release - long
  4. - Qualified release - short
  5. - HTF squeeze started / released



REPAINTING

Releases, markers, alerts and table counts are evaluated on confirmed bars. The higher-timeframe layer uses closed HTF bars only. The adaptive length and the percentile rank depend on recent history, so values on the current bar can move until it closes, like any indicator that uses the live bar.


SETTINGS OVERVIEW
  1. - General: Classic mode.
  2. - Adaptive length (Layer 1): on/off, min and max length, fixed length for when the layer is off.
  3. - Bands: BB and KC multipliers.
  4. - Compression (Layer 2): percentile ranking on/off, rank window, light / medium / tight percentiles, minimum squeeze bars.
  5. - Momentum (Layer 3): normalisation on/off, momentum threshold.
  6. - Release (Layer 4): qualified filter on/off, require range break, show unqualified releases.
  7. - Context (Layer 5): HTF wash on/off, HTF selection, stats table on/off, stats horizon.
  8. - Visual: palette.



CREDITS


  • - John Carter for the TTM Squeeze concept.
  • - LazyBear for the open-source Squeeze Momentum Indicator that this script extends. Layer 0 and Classic mode are his logic.
  • - John F. Ehlers for the Homodyne Discriminator (Rocket Science for Traders).


Open source. No hype, just data. Nothing here is a trade recommendation; a squeeze tells you volatility contracted, not which way it will expand.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.