OPEN-SOURCE SCRIPT

HTF Levels + Volume-Filtered Unmitigated Swings

1 549
Unmitigated Swings + HTF Confluence Levels
This indicator plots six categories of price reference levels on a single chart so traders can quickly identify zones of confluence where multiple independent level types overlap. The premise is that reactions are higher quality when price is approaching a level that is simultaneously meaningful on more than one basis — for example, an untested 1H swing low that also sits near the 4H 200 SMA and the .618 of the most recent 1H leg.

What it plots
Higher-timeframe SMAs. The 50 and 200 SMAs are pulled from the Daily, 4H, and 1H using request.security with lookahead off, then drawn as horizontal extensions on the current chart with a numeric price label. Each can be toggled individually.

Previous Day High and Low. PDH and PDL are tracked bar-by-bar using a running max/min that resets on each new daily bar, so the values are accurate intraday on any chart timeframe.
Previous Session High and Low. Rather than relying on TradingView's built-in session definition, this uses a configurable session window (default 18:00–08:00 exchange time, which covers the Globex / overnight period for U.S. futures). The script tracks the running high and low during that window and finalizes them when the session closes, so PSH/PSL reflect the actual overnight extremes rather than a generic session.

1H Fibonacci levels (.382, .500, .618, .786). The Fib range is anchored to the most recent 1H pivot high and pivot low using a configurable lookback (default 5 bars on each side). The .500 and .618 are drawn at a heavier weight because they are the primary reaction zones in this methodology; .382 and .786 are drawn lighter as secondary references.
Unmitigated 1H swing highs and lows. This is the script's main original component. Pivot highs and lows are detected on the 1H timeframe, but a swing is only plotted if the volume on the pivot bar passes a two-condition filter: it must be greater than the 20-period volume SMA and greater than the prior bar's volume. The intent is to filter out low-conviction pivots and keep only swings that printed on real participation. Each swing is then tracked in an array, and as soon as price closes through it the level is automatically removed from the chart. Levels older than a configurable age (default 10 days) are also pruned. The result is that the chart only ever shows swing levels that have not yet been tested — the "unmitigated" set.

Why these components are grouped
Each of the six categories represents a different type of memory in the market: institutional moving-average reference (SMAs), prior-period extremes (PDH/PDL, PSH/PSL), proportional retracement of the most recent leg (Fibs), and liquidity left behind at high-participation turning points (unmitigated swings). Used individually, any one of them produces a lot of noise. Used together, the meaningful trade locations are the ones where two or more of these independent references stack within a small price range. This script exists to make that stacking visible at a glance instead of requiring six separate indicators that each clutter the chart with their own labels and styling.

How to use it
Wait for price to approach a level. The setup gets stronger as more level types cluster within roughly 5–10 ticks of each other on gold (scale appropriately for other instruments). The unmitigated swings in particular tend to act as liquidity targets — price often sweeps them before reversing, so a sweep-and-reclaim of an unmitigated swing that also lines up with a Fib or SMA is a higher-quality entry than the swing alone. PSH/PSL frequently mark the boundaries of overnight ranges and are useful for both breakout and fade scenarios depending on which side of the range the regular session opens.

Inputs
All six categories can be toggled independently. The Globex session window, Fib pivot lookback, swing pivot lookback, volume MA length, max swing age, and label offset are all configurable. Label offset pushes the price labels to the right of the current bar so they do not overlap candles — increase it if labels still touch price action.

Notes
All higher-timeframe data uses lookahead=barmerge.lookahead_off to avoid repainting from future data. Swing levels are detected on closed 1H pivots, so they confirm swingLB bars after the actual high or low — this is intentional and necessary to avoid false pivots. Designed and tested on Micro Gold Futures (MGC) and Gold Futures (GC) but works on any liquid instrument.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。