OPEN-SOURCE SCRIPT

Strong PWH PWL Zones | ProjectSyndicate

5 768
Strong PWH PWL Zones

Strong PWH PWL Zones power-ranks the weekly levels that price keeps reacting to. For every week it plots the prior week's High, Low, Golden Pocket (the 50–61.8% retracement of the previous week's range) and Equilibrium as clean equal-height zones, then scores each High and Low 0–10 from measurable level quality — so you instantly know which previous-week level is likely to hold and which is likely to break. Where most PWH/PWL tools stop at drawing the level, this one tracks what price actually does to it: every extreme is followed through its full lifecycle from INTACT to SWEPT to ACCEPTED to FAILED BREAK, and the zone recolours as it goes. Anchor switchable between Weekly, Bi-Weekly and Monthly.

⬛ Core Framework

◾ Power-Ranking System (0–10) — every PWH and PWL earns a live grade from seven weighted factors: prior-week volume vs its baseline, range significance vs AWR, the rejection close (how far price closed off the extreme), distance from round numbers, isolation from recent weeks' extremes, stop-run context, and body-built extreme. Every weight is exposed and auto-normalised, so you can zero any factor you don't accept and the remaining ones rescale to fill the gap. Read the scoring provenance note below before you lean on the number.

◾ In-Zone Strength Labels — each level carries its grade inside the band: stars, the X.X/10 score, and a tier (FORMING → WEAK → MODERATE → STRONG → ELITE). Quality reads instantly without a separate panel.

◾ Previous Week Golden Pocket — the prior week's 50–61.8% fib zone, plotted automatically as the mean-reversion pocket where intraweek pullbacks so often stall.

◾ Equilibrium & Premium / Discount — the prior range's 50% line, with optional tinting of the premium and discount halves, so you always know which side of the weekly range you're trading from.

◾ Uniform AWR Zone Height — every zone (High, Low, Golden Pocket) is normalised to one identical AWR-based thickness, centred on its level, for a consistent look on any instrument.

◾ Period Separators — a full-height divider at the first bar of every anchor period, so each weekly block is visually bounded and you can never misread which week a level belongs to.

⬛ Level Lifecycle Engine

The heart of this build. A prior-week level isn't a static line — it has a life, and the state it's in tells you what to do with it.

▪️ INTACT — price has not resolved the level in either direction. ▪️ SWEPT — a wick pushed past the Sweep Trap line but the bar closed back inside the level. The stop-hunt happened and failed. ▪️ ACCEPTED — a close pushed beyond the Acceptance line. This is a real break, not a wick. ▪️ FAILED BREAK — price accepted beyond the level and then closed back inside it. Historically the highest-conviction reversal condition on the chart, and the one most tools never show you.

Each transition recolours the zone, retags its label, and prints an event marker on the bar that caused it. Twelve of the thirteen alerts are wired to these events, so you can be notified the moment a level changes character rather than hunting for it manually.

⬛ Weekly-Specific Layers

◾ Virgin Level Magnets — a prior-week extreme that the following week never traded into is unfilled business. It gets promoted to a persistent projection that survives the display cull and keeps reaching right until price finally tags it, then freezes at the tag bar so the interaction stays on the record. These are the levels price tends to travel back for.

◾ Sweep Trap & Acceptance Lines — two dashed levels above the PWH and two below the PWL. The amber Sweep Trap sits just beyond the level to mark the stop-hunt zone; the red Acceptance line sits further out to mark where a move becomes a genuine break rather than a wick. Both are fully offset-adjustable in AWR terms, and both feed the lifecycle engine directly — they are not decoration.

◾ Range Extension Targets — a measured continuation target projected beyond each extreme, sized from the prior week's own range, for when acceptance does hold.

◾ Opening Gap Tracking — the gap between the prior week's close and the new week's open, gated by a minimum AWR size so noise is ignored, with live fill tracking and a relabel the moment it closes.

⬛ Presentation & Control

◾ Strength-Shaded Fill — stronger levels render more opaque while weak ones stay faint, so the chart shows which levels carry weight before you read a single score.

◾ Score Filter — hide every level below a threshold so the chart only carries what earned its place. Purely visual: hidden levels are still tracked by the lifecycle engine, still fire alerts, and can still become magnets.

◾ Native Alerts (13) — zone touches for PWH, PWL and Golden Pocket; dedicated touches of STRONG (≥7/10) PWH and PWL; sweeps above PWH and below PWL; acceptance either side; failed breaks either side; virgin level tagged; opening gap filled.

◾ Fully Customisable — anchor period, scoring weights and normalisers, zone height, golden-pocket fib bounds, sweep/acceptance/extension offsets, separator style, magnet style and cap, gap threshold, colours, transparency, label text and size, and round-number step.

◾ Object-Budget Safe — at the heaviest setting (30 periods, every module on) the script draws well inside TradingView's 500-object limits, so nothing silently drops off the left edge of your chart.

⬛ Scoring Provenance — read this before you trust the number

Being straight with you about what has and hasn't been measured, because the score is only useful if you know what's behind it.

▪️ Five factors carry directions validated on DAILY data across FX and metals datasets — volume, range significance, rejection close, round-number distance and isolation. In that work, low-scored daily levels reacted meaningfully less often than high-scored ones. ▪️ Those directions have not been re-validated on weekly ranges. They are carried into this build as a reasoned prior, not as a measured weekly edge. Weekly levels are a different animal — fewer samples, wider ranges, different participants — and the daily result is not a promise that it transfers. ▪️ Two factors are structural priors and have not been backtested at all. Stop-run context (a week that took out the previous week's extreme and closed back inside it) and body-built extreme (an extreme built by candle bodies rather than a lone wick) come from market-structure reasoning, not from a study. ▪️ This is why every weight is exposed. Set the two new factors to 0 for the validated-direction subset, or reweight anything you disagree with. The score rescales automatically.

⬛ Repainting — what locks and what doesn't

▪️ Level geometry and scores are non-repainting. They lock in from the completed prior period and never change. Zones span exactly one period and close cleanly at the boundary — no bleed into the next week. ▪️ Lifecycle states evaluate against live price. On the currently forming bar a state can advance and its marker print before the bar closes, and the state will not step back down if price retreats within that same bar. On all closed bars the states reflect actual closes. If you want state changes to be strictly close-confirmed, wait for the bar close before acting on a live transition.

⬛ Why this is different

Most "previous week high/low" tools draw three equal-weight lines and leave you to guess which one matters. This one grades each level from prior-week behaviour, then keeps watching it — so you're not only told which level is worth respecting, you're told what price has already done to it. A STRONG level still INTACT is a level to fade. The same level flipped to FAILED BREAK is a reversal already in progress. And a virgin magnet sitting above an untouched high is where price is likely to reach for next.

🚀 Apply to Gold (XAUUSD), Silver, Forex, Crypto and Indices. Use a chart timeframe below your chosen anchor — H1 to H4 suits the weekly anchor well. The script warns you on-chart if your chart timeframe isn't lower than the anchor, since it can't resolve intra-period behaviour otherwise.

⬛ How To Trade It — Three Approaches

The score decides which approach fits; the lifecycle state tells you when it's live.

1) Sweep → Failed Break → Reversal (fade the trap) — use on STRONG / ELITE levels (≥7)

Best when the PWH or PWL is rated STRONG or ELITE.

▪️ Wait for price to push through the previous-week level and tag the amber Sweep Trap line beyond it — the liquidity grab that takes stops. The zone turns to its SWEPT tone and a marker prints. ▪️ Look for failure to reach or hold the red Acceptance line — the move stalls inside the trap band and prints rejection back through the level. ▪️ Entry: on the reversal back inside the level (a close back below PWH / above PWL). ▪️ Stop: just beyond the Acceptance line — if price closes there, the trap thesis is wrong and it's a genuine break. ▪️ Targets: Equilibrium and the Golden Pocket first, then the opposite previous-week level. ▪️ Strongest variant: let the level go to ACCEPTED and then flip to FAILED BREAK. You give up the best price but you're trading a break that has already been rejected rather than anticipating one. Use the Failed break alerts for this.

2) Acceptance Breakout → Trade With the Move — use on WEAK / MODERATE levels

Best when the level is rated WEAK or MODERATE, or formed on low prior-week volume.

▪️ Wait for a decisive break that closes beyond the red Acceptance line on expanding volume — not a single wick. The zone turns to its ACCEPTED tone. ▪️ The Sweep Trap line being cleared and held is your confirmation it's a real break, not a stop-hunt. ▪️ Entry: in the direction of the break on the close beyond the Acceptance line, or on a retest of the broken level. ▪️ Stop: back inside the level, beyond the Golden Pocket. ▪️ Targets: the Range Extension Target, trailing as the move extends. ▪️ A broken PWH flips to support, a broken PWL flips to resistance — the old level often becomes the retest entry. Watch for FAILED BREAK: if it appears, the flip has failed and you're on the wrong side.

3) Virgin Magnet Targeting — a weekly-only play

▪️ Identify a virgin magnet — a prior-week extreme the following week never reached, still projecting right. ▪️ Treat it as a destination rather than an entry. It gives your approach-1 and approach-2 trades a logical target that is defined by unfinished business rather than by a fixed multiple. ▪️ Use the Virgin level tagged alert to know the moment the magnet is reached, which is often exactly where a completed move runs out of fuel.

Rule of thumb: ⭐ STRONG/ELITE → expect a reaction, trade the trap reversal. ⭐ WEAK/MODERATE on volume → expect follow-through, trade the acceptance break. ⭐ FAILED BREAK → the market has already told you; trade the rejection.

⚠️ IMPORTANT NOTICE: This indicator identifies previous-week levels, grades them, and frames trap vs breakout scenarios. It should NOT be used as a standalone signal for entering trades. Five of the seven scoring factors carry directions validated on daily data and re-validated on nothing; two are untested structural priors. Always combine this tool with your own strategy, price-action analysis and risk management to confirm setups. Past statistical behaviour does not guarantee future results.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.