OPEN-SOURCE SCRIPT
已更新

Golden Pocket Reduxe

6 896
Golden Pocket Reduxe

Golden Pocket Reduxe is a single overlay that combines two of the most reliable kinds of price levels — Fibonacci Golden Pocket retracement zones and Supply/Demand order blocks — and shows you where they line up. It is built to give you a clean read of where price is most likely to react, across as many timeframes as you want to see at once, without the chart turning into spaghetti.

The Golden Pocket is the area inside a swing where pullbacks most often pause or reverse. The Reduxe applies this concept across multiple timeframes and trading styles at once, and pairs it with order-block detection so you can see when a Fib pullback is also landing on a level where institutional buyers or sellers stepped in.

Why this exists

Most Golden Pocket indicators draw one set of zones based on one set of pivot rules. That works great, but you might have issues when you change timeframes, switch from stocks to futures, or want to see a 1-hour zone while you trade a 5-minute chart. This indicator was built to address all of that:

  • It runs up to five GP setups at once — two on the chart timeframe and three from any higher timeframes you pick — without redrawing the same zone twice.
  • It detects supply and demand zones the way professional order-block traders do, with filters for break of structure, volume confirmation, and zone shrinkage on retest.
  • It highlights confluence — places where multiple signals overlap — so you can immediately see the highest-probability levels.
  • It handles futures session rollovers, non-standard chart types like Heikin Ashi and Renko, and Regular Trading Hours filtering for equities, all without you having to think about it.


Golden Pocket zones

The indicator tracks pivot highs and lows on whatever timeframe you point it at and draws the Golden Pocket retracement band between each pair. Each zone stays anchored to the specific pivot pair that created it, so an unrelated swing on the opposite side of the market does not destroy a still-valid zone. Bullish GPs mark pullback support in uptrends. Bearish GPs mark rally resistance in downtrends. Both can be color-coded, labeled, or hidden independently.

When a new pivot forms in the same direction, the previous zone can either be archived as a Closed GP (kept on the chart in a different color so you can see historical levels that may still matter) or removed entirely. Closed GPs can be cleaned up automatically by max count, by price invalidation, or both.

There is also an optional Active GP invalidation rule: if price closes beyond a zone for a set number of consecutive bars, the zone is closed automatically. While the counter is running, the box border can recolor as a warning so you can see at a glance which zones are about to be invalidated.

Supply and Demand zones

When an impulsive candle breaks recent structure, the indicator draws an order block at the last opposing candle before the impulse — the precise level where the previous side lost control. This is the classic order-block construction, not a wide consolidation range.

The S/D engine includes:

  • Break of Structure filter — only confirm a zone when the impulse actually breaks the recent high or low, not just any large candle inside a range. Toggleable.
  • Shrink on retest — each time price comes back to a zone, it shrinks from the tested edge to visually represent orders being absorbed. After the configured number of retests, the zone is removed.
  • Cross-invalidation — opposing zones that overlap heavily are automatically removed, since they cannot both be valid.
  • Volume protection — high-volume zones (marked with a ★) resist invalidation from weaker opposing impulses.
  • Overlap deduplication — prevents the same level from being marked twice.


Persistent GPs (Day / Week / Month)

Three calendar-period boxes drawn from the live High and Low of the current calendar day, week, or month. These are different from pivot-based GPs — they update continuously as the period's range expands and reset cleanly at the start of each new period. Each period has its own enable toggle, color, fib levels, position, label, midpoint extension, and Regular Trading Hours mode. They are anchored to calendar boundaries in the symbol's timezone, which means they stay stable across futures session rollovers and behave the same way on every symbol.

Useful for higher-timeframe context that does not move as fast as pivot-based GPs, intraday targets off the day range, and weekly or monthly bias zones for swing trading.

Profiles

Instead of forcing you to manually retune pivot distance, ATR multiplier, and zone height every time you change charts, the indicator ships with preset bundles tuned for different trading styles:

  • Auto — picks the best profile based on the chart's timeframe.
  • Scalping — tighter pivots and faster zones, suited to charts under 5 minutes.
  • Intraday — balanced settings for session trading on 15–30 minute charts.
  • Swing — wider, slower zones for institutional levels on 1-hour charts and above.
  • Custom — full manual control over every parameter.


GP profiles and S/D profiles are independent — you can run a Scalping GP and a Swing S/D on the same chart, or any other combination.

Multi-timeframe layout

  • Chart GP Profile 1 / 2 — two profile slots that draw on the chart timeframe with no higher-timeframe lag. Each has its own color.
  • Overlay Timeframe 1 / 2 / 3 — three slots that each have their own timeframe, GP profile checkboxes (Scalping, Intraday, Swing, Custom), and S/D profile selector. If an overlay slot's timeframe matches the chart and a chart profile already covers that profile, the overlay slot suppresses just that profile to avoid drawing the same zone twice.


So a typical setup might be: chart Profile 1 set to Auto for the chart timeframe, Overlay TF1 set to 1H for medium-term context, and Overlay TF2 set to 4H for higher-timeframe bias — all running simultaneously, each with its own color, all drawn on the same chart.

Confluence detection

Automatically highlights places where two GPs overlap, or where a GP overlaps an S/D zone. Confluence boxes are drawn in their own color and labeled "GP + GP" or "GP + S/D" so you can immediately tell which kind of agreement you're looking at. These are typically the highest-probability levels on the chart.

Volume enhancement

Zones that form on above-average volume are visually boosted (more opaque) and marked with a ★ in the label. The intuition is simple: a level made by real participation is more likely to hold than one made by thin price action. The volume MA length and the opacity boost are both configurable.

MA filter

Optional trend filter that restricts which GP boxes are drawn based on a configurable Fast/Slow MA pair. You can filter by trend direction (only draw GPs that align with the trend), by price position (only draw GPs whose pivots are on the right side of the MA), or turn the filter off entirely. Each MA has its own type (SMA or EMA), length, color, and line style (Solid / Dashed / Dotted).

Use Real OHLC

Forces the indicator to use actual market prices on non-standard chart types like Heikin Ashi, Renko, and Kagi. Without this, pivots and zones would be drawn from modified candle values that don't reflect real traded levels, and your entries, exits, and alerts would all sit at the wrong prices. Keep this on unless you specifically want zones based on the chart's modified candles.

Alerts

Two alert paths, usable independently or together:

  • Specific conditions — pick from the dropdown: Bull GP Touch, Bear GP Touch, Day GP Touch, Week GP Touch, Month GP Touch, Demand Zone Touch, Supply Zone Touch, Confluence Zone Touch, or Any Zone Touch.
  • All-Events Alert Stream — set the alert condition to "Any alert() function call" and every zone touch fires a detailed message with direction, timeframe, profile, and symbol — for example "Bull 15 Intraday Golden Pocket Hit on BTCUSD". Persistent GP touches fire as "Day GP Hit", "Week GP Hit", or "Month GP Hit".


Visual customization

Bull, Bear, Day, Week, Month, and Confluence labels each toggle independently. Volume ★ markers have their own toggle. GP box borders can be Solid, Dashed, or Dotted. Active GPs have separate cosmetic offset inputs that control visual width and position without affecting any underlying calculations. An optional GP anchor dot marks the pivot bar where each zone originated. Midpoint lines can optionally be extended back to the originating pivot to make the zone's history easier to read.

How to start

  • Open Settings → Inputs.
  • Pick a Chart GP Profile (Auto is a fine default) and a color.
  • Optionally enable one or more Overlay Timeframe slots if you want higher-timeframe GPs on the same chart.
  • Leave the S/D engine on its defaults to start; tune later if you want fewer or wider zones.
  • Enable Persistent GPs (Day / Week / Month) for fixed bias zones that don't depend on pivots.
  • To set up alerts, right-click the chart → Add alert → set the Condition to this indicator → pick a specific event or choose "Any alert() function call" with the All-Events stream toggle on.


Credit

Based on the original Golden Pocket script by TradingWolf, heavily extended from there.

Most features were inspired by Terry (Terryztrade), who taught myself and many others the true value of fibs.

Alert plumbing uses the RecursiveAlerts library by HeWhoMustNotBeNamed.

License

Open-source under the Mozilla Public License 2.0.
發行說明
fixed a typo, updated page chart.
發行說明
v1.1.1 — GP Extensions, expanded Confluence, and friendlier defaults

NEW
  • GP Extensions — Optional fib extension band drawn above each Bull GP and below each Bear GP, projecting the same fib levels outward from the swing. Live-updates and invalidates with its parent GP. Available for chart profiles, TF1 / TF2 / TF3 overlays, and persistent Day / Week / Month GPs.
  • Bonus Line — Single fib extension line at a user-set classic level (default 1.272). Sits inside or beyond the extension band. Independent toggle for chart-TF GPs, and a global one for the persistent Day / Week / Month GPs. Ideal for fans of the 1.272 / 1.618 / 2.618 targets.
  • Expanded Confluence Detection — The Confluence layer now flags five overlap types:
    • GP + GP — two Golden Pockets stacking
    • GP + S/D — Golden Pocket landing inside a supply/demand zone
    • Ext + Ext — extension targets stacking (new)
    • Ext + GP — extension landing inside another GP (new)
    • Ext + S/D — extension landing inside a supply/demand zone (new)

    Persistent Day / Week / Month GPs now also participate in confluence detection.
  • Confluence box merging — When two confluence highlights overlap heavily, they collapse into a single box with combined label (e.g. GP + S/D & Ext + S/D). No more triple-stacked labels obscuring the chart.


IMPROVED
  • S/D Zones now truly merge. Previously, same-side zones with significant overlap would replace each other (sometimes losing the larger informative zone) — and "sandwich" patterns where a small new zone sat just above and below a big existing one would survive as three separate boxes. Now they merge into a single union zone, clamped to the configured Max Zone Height. ★ Vol stars carry through if either side qualified.
  • Persistent GP layout cleanup. Day / Week / Month GP boxes now tile horizontally by default instead of all stacking on the same right edge. Week and Month also share an offset and use vertical label staggering (Day=top, Week=center, Month=bottom) so even custom overlapping configurations stay readable.


FIXED
  • Phantom giant GP boxes. On low-timeframe charts, the very first calculated bar could synthesize a fake pivot from a na predecessor and produce one massive overlapping GP. The pivot detector now requires a valid prior bar before triggering.


DEFAULTS
  • TF1 / TF2 / TF3 overlays start disabled. Cleaner first launch — chart Profile 1 (Auto) does the heavy lifting. Enable overlays only when you want multi-timeframe context.
  • Bull / Bear GP labels off. The colored zone tells you the direction; the words sometimes confused users when a Bull GP appears above price (or Bear GP below). Day / Week / Month and Confluence labels remain on — those identifiers are unambiguous.
  • Profile 2 default color is now teal for clearer separation from the gold of Profile 1.


DOCS
  • Confluence tooltip clarifies that GP + GP confluence requires more than one GP on the chart. Enable TF1 / TF2 / TF3 with different timeframes to get true multi-timeframe stacks. The script intentionally does not silently scan extra TFs in the background — you only pay compute for what you draw.
  • Day / Week / Month GP tooltip notes that early in a new period the box can look very thin — it represents the actual current range and expands as the High/Low develop.


NEXT (v1.2 preview)
  • Fib Ladder mode. It'll be somewhat unique, stay tuned.
發行說明
v1.1.2 — Ex. Labels & Period-Aware Confluence

Added — "Ex." Extension Markers
  • New Ext. toggle in the Visuals group (default ON) places a small "Ex." marker in the bottom-left of every extension box — per-pivot (chart + TF1/2/3) and persistent (Day/Week/Month).
  • Makes it instantly obvious which boxes are extension targets vs. primary GP retracement bands, especially when zones cluster.
  • Toggle responds live; persistent extension boxes update in place rather than redrawing.


Improved — Period-Specific Confluence Labels
  • Confluence overlap labels now name the specific source on each side instead of generic "GP" / "Ext":
    • Day GP + Week GP
    • Week GP + S/D
    • Day Ext + Month GP
    • Month Ext + Week Ext
  • Chart and overlay-TF boxes still read as "GP" / "Ext" (they don't carry a calendar period), but persistent Day/Week/Month boxes now identify themselves.
  • Merged confluence labels still chain correctly — e.g. Week GP + S/D & Day GP + S/D when zones stack tightly.
發行說明
v1.2 — Fib Ladder, Shorthand Labels, Polish Pass

New
  • Fib Ladder — project a set of fib rungs from any active GP's pivot pair. Replaces generic fib retracement drawings with rungs that slide and disappear with their owning GP.
    • Modes: Retracement (inside the box), Extension (beyond the pivot pair), or Both.
    • Source: All slots, Auto (most recent GP), or Pin to a specific source — Chart P1/P2, TF1/TF2/TF3, or Day/Week/Month.
    • Rung Extension: Match GP, Extend Right, Extend Both Ways, or Show on Closed GPs.
    • Custom rung lists for retracement and extension levels.
    • Palettes per side: Spectrum (ROYGBIV), Heatmap, Cool, Mono Gradient, Inherit GP Color, Custom Solid.
  • Rung Labels — annotate each rung with Level, Price, or Both. Sits offset to the side of the rung with a thin dashed connector. Configurable side (Left/Right), bar offset, and Match Rung / Custom color modes.
  • Shorthand Labels — single toggle that compacts every active label: Bull → BL, Bear → BR, Day → D, Week → W, Month → M, Ext → X, plus DX/WX/MX for persistent extensions. Confluence labels use these too.
  • Persistent Midpoint Matches GP Color — toggle (default ON) so each Day/Week/Month midpoint line takes its color from that period's GP. Easy to tell at a glance which extended midpoint belongs to which period. Disable to use a single custom color across all three.


Changed
  • Chart GP midpoint default is now royal blue (more readable on dark themes than the prior white).
  • Confluence dedupe — merged confluence labels now tokenize and dedupe their type list, preventing the runaway "GP + GP + GP + …" labels that could appear when several zones stacked at the same level.
  • Same-period skip in confluence detector — a Day GP and its own Day Extension (and same for Week/Month) no longer report as confluence with each other.


Fixed
  • Encoding artifacts in tooltips (literal [icode]\u2605[/icode], [icode]\u2013[/icode], [icode]\u2014[/icode] sequences) restored to their proper unicode characters (★, –, —).
  • Persistent midpoint color inputs that had been silently dropped during an earlier edit pass — restored, with the new GP-matching behavior wired up.
發行說明
v1.3 — Fib Ladder Lock Levels, Extension Alerts

New

Fib Ladder — Lock Levels
  • New Lock Levels toggle (default ON). When enabled, each rung's price anchors to the H/L from the moment its GP was drawn and only reprices when that GP redraws — opposing swings can no longer drift your targets.
  • Bull rungs lock to the pivot-high event; bear rungs lock independently to the pivot-low event.
  • Day / Week / Month ladders lock to the completed prior period's full range (e.g. today's ladder uses yesterday's high/low). Falls back to the developing range on the first bar of chart history.
  • Turn Lock Levels OFF to restore the original behavior (rungs recalculate continuously from the live range).


Alerts — GP Extension Zones
  • Extension boxes (chart, overlay TFs, and Day/Week/Month) now fire alerts in the All-Events Alert Stream — e.g. "Bull 15 Intraday GP Extension Hit on BTCUSD", "Day GP Extension Hit on BTCUSD".
  • Two new alert selections: Bull GP Extension Touch and Bear GP Extension Touch.
  • Any Zone Touch condition updated to include extension touches.

發行說明
v1.3.2 HOTFIX
  • Removed duplicate alert placeholder
  • Removed dead range variable in the ladder manager left over when adding locked levels.
發行說明
v1.5

New

Out of Play Highlight
  • Active GP boxes now show a colored border (default blue) when price is on the wrong side of the zone — Bull GP below price, or Bear GP above price. Signals the zone exists but is not currently set up for a reaction.
  • On by default. Color is adjustable. The invalidation warning color still takes priority when a zone is counting down to close.
  • Found under Active GP Behavior.


Prior Period Levels
  • New section adds optional horizontal lines for the prior day, week, and month highs and lows — PDH, PDL, PWH, PWL, PMH, PML.
  • Each pair has its own color. Shared controls for labels, RTH mode, and line style.
  • Lines are fixed for the full current period and update at the boundary. All off by default.


Fib Ladder — Fill Between Rungs
  • New toggle shades the space between each pair of adjacent rungs. Color follows each rung's palette at reduced opacity.
  • Works for all ladder modes. Off by default.


Extend Midpoint Right
  • New toggle extends the GP equilibrium line to the right edge of the chart and beyond, projecting the midpoint as a forward price reference.
  • Combine with Extend Midpoint to Pivot for a continuous line anchored at the originating swing. Off by default.


Heikin Ashi Warning
  • When a Heikin Ashi chart is detected, a label appears noting that S/D zones may show more signals than on a standard chart. GP zones are always unaffected. If you're an HA enjoyer, this problem will be addressed with an upcoming indicator, Phantom Chart.
  • Toggleable, on by default.


Changes

Day / Week / Month GPs now use the prior completed period
  • Previously the boxes used the live developing range, which made them tiny or thin at the start of each new period until enough price action accumulated.
  • The boxes are now anchored to the prior day's, week's, or month's confirmed range and stay fixed for the full session. Day GP shows yesterday's level, Week GP shows last week's, and so on.
  • RTH mode uses the prior RTH range, with a fallback to the full prior range if no regular session was active that period.


Bug Fixes

Fib Ladder — Extend Right showed double lines
  • In Extend Right mode, each rung appeared twice — once as a drawn line and again as an extension — creating a visual overlap. Fixed.


GP draw speed restored
  • A prior workaround caused swing GPs to wait for an extra swing before drawing, adding a noticeable delay on lower timeframes. Reverted to the original behavior where GPs draw as soon as the pivot is confirmed while solving the previous GP collapse bug occasionally seen at the start of new periods.

發行說明
v1.4.1 HOTFIX — Prior Period Level Labels

  • Accidentally updated with a slightly earlier version of the script with unfinished Prior Period Level behavior
  • Prior Period level lines (PDH/PDL, PWH/PWL, PMH/PML) no longer project to the right of the current bar — they now run leftward across history and stop at the current bar, keeping the right-side space clear.
  • Prior Period labels now float to the right of the current bar instead of sitting on the line, so they no longer collide with the Fib Ladder labels when the ladder is set to Extend Right.
  • Added a Label Offset (bars) setting for Prior Period Levels, defaulting just past the Fib Ladder labels. Adjust to move the labels further in or out.

發行說明
v1.4.2 HOTFIX — Prior Period Level Lines

  • oops I did it again
  • Fixed the Prior Period level lines (PDH/PDL, PWH/PWL, PMH/PML) not rendering after the previous update. The leftward extension is now re-asserted every bar, so each level draws as a horizontal line across history that stops at the current bar.

發行說明
Supply / Demand Zones — Reliability Update

New: Remove Broken Zones (on by default)
  • A zone now disappears the moment price closes through the far side of it — a demand zone is removed when a candle closes below it, a supply zone when a candle closes above it.
  • Stops "dead" zones from lingering on the chart after price has already traded clean through them.
  • Can be switched off if you prefer to keep broken zones on screen.


Fixed: Retests counting too fast
  • Previously, a slow grind straight through a zone could be counted as several retests in a row, using the zone up far too quickly.
  • A retest now only counts when price genuinely leaves the zone and comes back to it — so the zone shrinks and expires at a realistic pace.
  • Zones that price gaps or opens directly inside are now handled correctly too.


New: Retest on Bar Close (off by default)
  • When on, only a candle that closes into the zone counts as a retest — a quick wick poke no longer shrinks or consumes it.
  • More conservative: zones survive longer and tolerate brief spikes.


Also
  • A freshly created zone can no longer instantly burn a retest off the very candle that formed it.

發行說明
v1.5

New: Quick GP profile
  • A new profile alongside Scalping / Intraday / Swing, selectable on the chart and on any overlay timeframe. It draws a Golden Pocket immediately from the highest and lowest price over a set number of recent bars — no waiting for a swing to confirm, like marking the recent range by eye.
  • Lookback auto-sizes to the timeframe (50 bars on 5m and under, down to 20 on Daily+), or set your own with Quick Profile Lookback.
  • Updates once per candle rather than flickering tick by tick on the live bar.
  • Fully wired into extensions, confluence, alerts, and the Fib Ladder, just like the other profiles.


New: Source-timeframe tags on overlay GPs
  • A GP drawn from a different timeframe now carries a small tag in its corner showing where it came from (15m, 1h, 4h, 1D, etc.), so stacked multi-timeframe zones are easy to tell apart at a glance. Chart-timeframe GPs stay untagged.


New: Supply / Demand controls
  • Remove Broken Zones (on by default) — a zone is cleared once a candle closes through its far side, so price no longer trades clean through a zone that lingers on the chart.
  • Retest on Bar Close (off by default) — only count a retest when a candle closes into the zone, so a quick wick poking in and pulling back won't use it up.


Fixed: Prior-period levels now work on every timeframe
  • PDH / PDL / PWH / PWL / PMH / PML read the same on a 1-minute chart and a 4-hour chart, and now appear even on low timeframes where they previously didn't show. No more "prior day" reading as the prior week on higher timeframes.


Fixed: Day / Week / Month GPs line up with the prior-period levels
  • The persistent GP boxes and the PDH/PDL-style lines now draw from the same source, so they always agree on the same prices, on any chart timeframe.


Fixed: Supply / Demand retest counting
  • A slow grind straight through a zone is no longer miscounted as several retests — a retest now only counts when price genuinely leaves the zone and returns, so zones expire at a realistic pace. Zones that price gaps or opens inside are handled correctly too.

免責聲明

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