OPEN-SOURCE SCRIPT

Multi-Timeframe Squeeze Board Lite

199
What it shows

Multi-Timeframe Squeeze Board — Lite answers one question at a glance: "Where is this symbol compressed, and which way is momentum leaning, on every timeframe that matters?" For the chart's symbol it displays a compact table with one row per timeframe — 15m, 1h, 4h, Daily, Weekly — and two readings per row:

- Sqz — the TTM Squeeze compression state as a colored dot, using the standard three-level cascade: orange = high squeeze (deepest compression), red = mid squeeze, black = low squeeze, green = no squeeze (volatility released / normal).
- Mom — the squeeze momentum oscillator as a colored arrow using the classic 4-color scheme: aqua = positive and rising, blue = positive but falling, yellow = negative but rising, red = negative and falling. The arrow points up when momentum is increasing bar-over-bar and down when it is decreasing.

A stacked squeeze (orange/red dots on several adjacent timeframes) marks a market coiling across horizons; the momentum colors tell you which side the pressure is building on.

How it works

Each row runs the full TTM Squeeze calculation on its own timeframe via request.security() with lookahead = barmerge.lookahead_off (no future data, ever):

1. Bollinger Bands: SMA(close, 20) basis, 2.0 × population standard deviation.
2. Keltner Channels: the same SMA(close, 20) basis, with band width = SMA of True Range over 20 bars (simple average of TR — not Wilder's ATR) at three multipliers: 1.0, 1.5, 2.0.
3. A squeeze is on when the Bollinger Bands sit fully inside the Keltner Channel on both sides. The narrower the Keltner band that still contains the BB, the deeper the compression — hence the 1.0-multiplier band defines the high squeeze, 1.5 the mid, 2.0 the low.
4. Momentum is the linear regression of price's deviation from the average of the Donchian midline and the SMA, over the same 20 bars.

By default the board evaluates confirmed bars only: every row shows the last fully closed bar of its timeframe, so a dot or arrow never changes after it appears. See Limitations for the tradeoff.

Inputs

- Squeeze length — lookback for BB, KC and momentum (default 20, the canonical TTM setting).
- Confirmed HTF bars only — ON (default): stable, non-repainting readings that lag up to one bar of each row's timeframe. OFF: rows track the still-forming higher-timeframe bar — more current, but the reading can flip until that bar closes.
- Table position / Table size — where the board sits and how large it renders.

How to use it

Apply it to a 15m chart (or lower) so all five rows populate. Scan the Sqz column top-to-bottom: multiple orange/red dots stacked across timeframes indicate multi-horizon compression — historically the precondition for expansion moves. Then read the Mom column for directional lean while the compression resolves. The board is a context tool: it tells you where energy is stored, not when or in which direction it must release.

Limitations — please read

- Confirmed-bar lag: with the default non-repainting mode, the Weekly row updates once per week, the Daily row once per day, etc. That is the honest cost of stability. Turning the toggle off shows the live forming bar instead, and those readings can change until the bar closes.
- Rows below the chart's timeframe show "–": Pine's request.security() cannot reliably reconstruct lower-timeframe series, so instead of showing a possibly wrong dot the board declines to show one. Use a 15m chart to see everything.
- A squeeze has no direction. Compression means stored energy, not a buy or sell signal. The momentum color is a lean, not a prediction.
- Warm-up: each timeframe needs about 20 bars of history before its row populates (shown as "·" until then).

This board covers one symbol — the chart's.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.