OPEN-SOURCE SCRIPT

Inverse Golden Pocket MTF Zones

1 427
IGP Multi-TF Zones — Inverse Golden Pocket Mapper
Overview
IGP Multi-TF Zones identifies dynamic support and resistance by detecting when price inverts through a Fibonacci golden pocket (the 0.618–0.786 zone) on any timeframe. When price breaks through a golden pocket from one side, that zone flips from resistance to support (or vice versa), creating a high-probability area for re-entry on a retest.
The indicator overlays golden pocket zones from up to four timeframes simultaneously — your chart timeframe plus three configurable higher timeframes — so you can spot multi-timeframe confluence at a glance. Each zone tracks its lifecycle from formation through inversion or invalidation, with full visual feedback at every stage.
How it works:

Detects swing high → swing low pairs using pivot-based logic
Draws the golden pocket zone (0.618–0.786 retracement) between the swings
Monitors for inversion — a candle closing through the 0.786 level, confirming the zone has flipped
Inverted zones change color (green for long, red for short) and become active areas to watch for retests
Zones that get broken the wrong way (price closes beyond the swing origin) are invalidated and removed

This is not a signal generator — it's a zone mapper. It shows you where the important levels are across multiple timeframes and lets you apply your own entry logic.

Settings Reference
Timeframe Combo
Preset — Quick selection for which timeframes to display:

Chart Only: Only your chart's own timeframe zones
Chart + 15m: Chart TF plus 15-minute zones
Chart + 15m + 30m: Three-tier view (default)
Chart + 15m + 30m + 1h: Full four-tier stack
Custom: Manually select each HTF and toggle independently


Chart TF
Show Chart TF Zones — Master toggle for your chart's native timeframe zones. Turn off if you only want higher TF zones overlaid.
Extend Right (bars) — How many bars ahead the zone box extends past the current bar. Default: 15.
Label Position — Where the zone info label sits relative to the box: Top-Left, Top-Right, Bot-Left, or Bot-Right. Use different positions per TF to prevent overlap.

HTF 1 / HTF 2 / HTF 3
Each higher timeframe has its own self-contained settings group:
Timeframe — Which timeframe to pull swing data from (e.g., 15m, 30m, 1h, 4h, D).
Enabled — Toggle this HTF on/off.
Min Swing (pts) — Minimum size in points for a swing to qualify. Higher timeframes naturally produce larger swings, so set this proportionally. Defaults: HTF1 = 45, HTF2 = 80, HTF3 = 145.
Extend Right (bars) — Independent extend per TF. Higher TF zones represent bigger structures, so longer extensions make sense. Defaults: HTF1 = 30, HTF2 = 50, HTF3 = 80.
Freeze Inverted — When on, inverted zones stop extending after a set number of bars, freezing them in place on the chart.
Freeze After (bars) — How many bars after inversion before the zone freezes.
Label Position — Top-Left, Top-Right, Bot-Left, or Bot-Right. Set different TFs to different corners to avoid label stacking.

Swing Detection
Pivot Lookback — Number of bars on each side to confirm a swing high/low. Higher values = fewer, more significant swings. Default: 5.
Min Swing (pts) — Chart TF — Minimum point range between swing high and swing low for chart timeframe zones. Filters out insignificant micro-swings. Default: 25.

Fibonacci
Entry Level — Which fib level defines the entry edge of the golden pocket box. Options: 0.618 (default), 0.705, 0.786. The box always draws from your chosen entry level to 0.786.
Show Entry Lines — Dashed line at the entry fib level (the bottom/top edge of the GP zone).
Show CE Line — Consequent Encroachment line at the midpoint of the golden pocket (halfway between entry level and 0.786). CE is a key reaction level within the zone. Turns green/red on inversion.
Show 0.786 Line (uninverted) — Dotted line at the inversion trigger level. Visible only on potential (uninverted) zones — once the zone inverts, this line disappears since it has served its purpose.
Show 0.886 Line (uninverted) — Dotted line at the deep retracement level. Shows the extreme edge of the golden pocket. Also disappears on inversion.

Direction
Long Setups (Bearish GP) — Show zones where a bearish swing (high → low) creates a golden pocket that could invert into long support.
Short Setups (Bullish GP) — Show zones where a bullish swing (low → high) creates a golden pocket that could invert into short resistance.

IDs & Swing Labels
Show Zone IDs — Each zone gets a unique sequential ID (Z1, Z2, Z3...) shown on the zone label.
Show Swing IDs — Labels at each swing high (H) and swing low (L) that formed a zone, tagged with the zone ID and timeframe. Example: "Z42 5m H". Only swings that generated a zone are labeled. When multiple zones share the same swing point, labels merge with a "/" separator (e.g., "Z42 5m H / Z43 15m H").
Show Swing Lines — Dotted horizontal lines extending from each swing high and swing low to the right edge of the zone box. Lines turn solid on inversion.
Swing ID Size — Text size for swing labels: tiny, small, or normal.
Swing High ID Color — Color for swing high labels and lines. Default: orange.
Swing Low ID Color — Color for swing low labels and lines. Default: blue.
Zone ID Size — Text size for the zone ID portion of labels.

Zone Lifecycle
Delete Invalidated Zones — When on, zones that get broken (price closes beyond the swing origin) are immediately removed from the chart. When off, they stay visible with gray dotted borders.
Max Zones Per TF — Maximum number of zones to keep per timeframe. When exceeded, the oldest zone is removed. Default: 6. Max: 50.

Invalidation
Invalidate on Swing Break — When price closes below the swing low (for long zones) or above the swing high (for short zones), the zone is marked as invalidated. Turn off to keep all zones alive indefinitely.

Visuals
Show Zone Labels — Master toggle for all zone info labels.
Zone Label Size — Text size for zone labels: tiny, small, or normal.

Zone Label Content
Fine-grained control over what information appears in each zone's label. Every field can be toggled independently:
Zone ID (Z123) — The sequential zone identifier. Default: ON.
Timeframe + Direction — Shows the source timeframe and direction arrow, e.g., "5m GP↑" or "15m IGP↓". Default: ON.
Swing Size (42pt) — The point range of the swing that formed the zone. Default: ON.
Swing Refs [H→L] — Shows which swing high and low IDs created the zone, e.g., "[H13→L12]". Default: OFF.
Swing Time — Timestamp (ET) of when the swing that formed the zone was detected. Default: ON.
Inversion Time — Timestamp (ET) of when the zone inverted. Only appears on inverted zones. Default: ON.
CE Value — The Consequent Encroachment price level. Default: ON.

TF Colors
Chart TF — Color for chart timeframe zones. Default: purple.
HTF 1 — Color for the first higher timeframe. Default: blue.
HTF 2 — Color for the second higher timeframe. Default: orange.
HTF 3 — Color for the third higher timeframe. Default: teal.
CE Line — Color for the Consequent Encroachment line. Default: white.
Inverted Long — Color for zones that have inverted bullish (long). Default: green.
Inverted Short — Color for zones that have inverted bearish (short). Default: red.

Zone States
Potential (colored by TF) — A golden pocket has formed but price hasn't broken through the 0.786 level yet. The zone extends to the right each bar. This is a zone to watch.
Inverted (green or red) — Price closed through the 0.786 level, confirming the golden pocket has flipped. The zone is now an active support/resistance area for retests. The CE line and swing lines turn solid. The 0.786 and 0.886 helper lines disappear.
Invalidated (gray/deleted) — Price closed beyond the swing origin, breaking the zone. Depending on settings, the zone is either deleted or shown as a gray dotted outline.

Multi-Timeframe Confluence
The real power is in stacking timeframes. When a 5m zone overlaps with a 15m and 30m zone at the same price level, that's multi-timeframe confluence — a much higher probability reaction area than any single-TF zone alone.
Higher timeframe zones draw with thicker borders and more opacity so they stand out visually. Color-coding by timeframe lets you instantly see which TFs are aligned.

Tips

Start with Chart + 15m + 30m preset and adjust from there
Set different label positions per TF (e.g., chart = Top-Left, HTF1 = Top-Right) to avoid clutter
Higher TFs need larger min swing values to filter noise — the defaults are tuned for NQ but adjust for your instrument
Use Freeze Inverted on lower TFs to keep the chart clean, turn it off on higher TFs so they keep extending
The CE line is often the first reaction level within a zone — watch for wicks to CE
When swing labels show merged IDs (Z42/Z43), that swing point is extra significant — multiple timeframes agree on it


Built for NQ futures. Works on any instrument — adjust min swing sizes to match your market's typical range.

免責聲明

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