OPEN-SOURCE SCRIPT
Cập nhật Avg Weekly Move + Implied

Projects the expected weekly range and the key levels that drive it, anchored to the current week and readable on any timeframe; no repaint.
What it plots
- Average weekly move band — the mean weekly move over a configurable lookback, drawn as upper/lower lines around an anchor (this week's open or prior week's close). Choose Close-to-Close or High-Low Range, and Percent basis (scales to current price) or raw Points.
- Implied move overlay (manual) — enter the expected move from your broker's option chain for the weekly expiry; plots a dashed band and shows the implied-vs-realized ratio so you can see if options are pricing more or less than history.
- Prior-week high / low — the prior week's range edges, the levels price most often reaches for.
- OpEx markers — faded shading on monthly 3rd-Friday expirations, with quad-witching (Mar/Jun/Sep/Dec) in its own color and an optional charm run-in shade.
- Dashboard (bottom-right) — avg move, implied (+ ratio), band "held %" reliability, prior-week levels, next OpEx. date/type/phase, and a per-symbol PWH-reliability flag.
How to read it
- "Held %" tells you how often the band actually contained the week — high = trustworthy, low = the symbol's vol outruns its average (treat the band loosely).
- The PWH flag reads "Reliable here" on broad-index symbols and "Weak" on range-bound names...the prior-high draw is strongest on indices; back-tested this over 3 years.
Notes
- Non-repainting: all weekly values come from completed weeks via higher-timeframe data, so they stay fixed intra-week and read identically on 15m, 1H, or daily.
- The Implied Move is a manual input (Pine can't access options data) — refresh it each week per symbol. I use ThinkOrSwim for finding the Implied Move.
- Works on any symbol; OpEx dates are universal, but the OpEx behavioral context was studied on index products. I imagine, a date or two could be off, but you can save and adjust the code as you see fit.
What it plots
- Average weekly move band — the mean weekly move over a configurable lookback, drawn as upper/lower lines around an anchor (this week's open or prior week's close). Choose Close-to-Close or High-Low Range, and Percent basis (scales to current price) or raw Points.
- Implied move overlay (manual) — enter the expected move from your broker's option chain for the weekly expiry; plots a dashed band and shows the implied-vs-realized ratio so you can see if options are pricing more or less than history.
- Prior-week high / low — the prior week's range edges, the levels price most often reaches for.
- OpEx markers — faded shading on monthly 3rd-Friday expirations, with quad-witching (Mar/Jun/Sep/Dec) in its own color and an optional charm run-in shade.
- Dashboard (bottom-right) — avg move, implied (+ ratio), band "held %" reliability, prior-week levels, next OpEx. date/type/phase, and a per-symbol PWH-reliability flag.
How to read it
- "Held %" tells you how often the band actually contained the week — high = trustworthy, low = the symbol's vol outruns its average (treat the band loosely).
- The PWH flag reads "Reliable here" on broad-index symbols and "Weak" on range-bound names...the prior-high draw is strongest on indices; back-tested this over 3 years.
Notes
- Non-repainting: all weekly values come from completed weeks via higher-timeframe data, so they stay fixed intra-week and read identically on 15m, 1H, or daily.
- The Implied Move is a manual input (Pine can't access options data) — refresh it each week per symbol. I use ThinkOrSwim for finding the Implied Move.
- Works on any symbol; OpEx dates are universal, but the OpEx behavioral context was studied on index products. I imagine, a date or two could be off, but you can save and adjust the code as you see fit.
Phát hành các Ghi chú
Updated....Implied move
- VIX-auto option — auto-fills the band from VIX9D (default, correct weekly tenor) or VIX, symbol-aware (VIX→SPX/SPY, VXN→QQQ, RVX→IWM), toggle to revert to manual, gated on non-index symbols.
Prior-week levels
- Self-aware PWH reliability flag — "Reliable here" (SPX/SPY/QQQ) vs "Weak" elsewhere.
OpEx calendar (all auto-computed, zero-repaint)
- Faded OpEx shading — monthly grey, quad-witching orange.
- Charm run-in shade (~T-5→T0) + 14-day max-pain watch shade.
- Dashboard Phase (Charm/Quad run-in / Post-OpEx / Neutral) + Next-OpEx date/type.
Manual GEX levels (key from Periscope; 0 = hidden)
- Max Pain + GEX Flip — glowing lines (halo + core), color pickers, glow toggle.
- Independent label offsets for each (to stagger when close).
- 3 positive + 3 negative gamma zones — top/bottom shaded bands, color pickers.
Dashboard (bottom-right) — Avg move, Implied (+ratio), Held %, PW High/Low, Next OpEx, Type, Phase, PWH flag, VIX level + regime (calm/normal/elevated/stress). Text-size option.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.