OPEN-SOURCE SCRIPT
更新済 SPX Levels Mapper (Auto-Calibrating v3)

SPX Levels Mapper (Auto-Calibrating v3)
Plot S&P 500 levels directly on any chart — converted automatically using a live rolling linear regression between SPX and your instrument.
How it works:
The indicator pulls real-time SPX data and runs a rolling linear regression against whatever ticker you're charting over a configurable lookback window. Any SPX level you input gets converted to its equivalent price on your chart — no manual slope or intercept needed.
Features:
Auto-calibrating regression that updates every bar
Works on any correlated instrument (NQ, MNQ, ES, MES, individual stocks, etc.)
8 configurable level slots, each with its own color, label, and settings
Per-level gamma toggle (Positive / Negative) with ⚠ warning labels for negative gamma
Per-level Hard Stop toggle — marks levels where price should stop with a 🛑 label
Optional padded zones (±10 points default) to visualize the area of influence around each level
Per-level zone transparency control so you can dial up intensity on key levels and fade out the rest
Info box showing live regression stats (slope, intercept, R²)
Use cases:
Map SPX gamma/GEX levels from Unusual Whales, SpotGamma, etc. onto any chart
Distinguish between positive and negative gamma environments per level
Mark hard stops where market maker positioning suggests price rejection
Visualize zones of influence with adjustable padding and intensity
How to use:
Add to any chart that correlates with SPX
Enter SPX levels in the settings — each level has its own group
Toggle gamma type, hard stop, zone visibility, and transparency per level
Lines and zones appear at the equivalent price on your chart, updating in real time
Built for traders who read SPX flows but execute on other instruments.
Plot S&P 500 levels directly on any chart — converted automatically using a live rolling linear regression between SPX and your instrument.
How it works:
The indicator pulls real-time SPX data and runs a rolling linear regression against whatever ticker you're charting over a configurable lookback window. Any SPX level you input gets converted to its equivalent price on your chart — no manual slope or intercept needed.
Features:
Auto-calibrating regression that updates every bar
Works on any correlated instrument (NQ, MNQ, ES, MES, individual stocks, etc.)
8 configurable level slots, each with its own color, label, and settings
Per-level gamma toggle (Positive / Negative) with ⚠ warning labels for negative gamma
Per-level Hard Stop toggle — marks levels where price should stop with a 🛑 label
Optional padded zones (±10 points default) to visualize the area of influence around each level
Per-level zone transparency control so you can dial up intensity on key levels and fade out the rest
Info box showing live regression stats (slope, intercept, R²)
Use cases:
Map SPX gamma/GEX levels from Unusual Whales, SpotGamma, etc. onto any chart
Distinguish between positive and negative gamma environments per level
Mark hard stops where market maker positioning suggests price rejection
Visualize zones of influence with adjustable padding and intensity
How to use:
Add to any chart that correlates with SPX
Enter SPX levels in the settings — each level has its own group
Toggle gamma type, hard stop, zone visibility, and transparency per level
Lines and zones appear at the equivalent price on your chart, updating in real time
Built for traders who read SPX flows but execute on other instruments.
リリースノート
SPX Levels Mapper (Auto-Calibrating v3)Plot S&P 500 levels directly on any chart — converted automatically using a live rolling linear regression between SPX and your instrument.
How it works:
The indicator pulls real-time SPX data and runs a rolling linear regression against whatever ticker you're charting over a configurable lookback window. Any SPX level you input gets converted to its equivalent price on your chart — no manual slope or intercept needed.
Features:
Auto-calibrating regression that updates every bar
Works on any correlated instrument (NQ, MNQ, ES, MES, individual stocks, etc.)
8 configurable level slots, each with its own color, label, and settings
Per-level gamma toggle (Positive / Negative) with ⚠ warning labels for negative gamma
Per-level Hard Stop toggle — marks levels where price should stop with a 🛑 label
Optional padded zones (±10 points default) to visualize the area of influence around each level
Per-level zone transparency control so you can dial up intensity on key levels and fade out the rest
Info box showing live regression stats (slope, intercept, R²)
Use cases:
Map SPX gamma/GEX levels from Unusual Whales, SpotGamma, etc. onto any chart
Distinguish between positive and negative gamma environments per level
Mark hard stops where market maker positioning suggests price rejection
Visualize zones of influence with adjustable padding and intensity
How to use:
Add to any chart that correlates with SPX
Enter SPX levels in the settings — each level has its own group
Toggle gamma type, hard stop, zone visibility, and transparency per level
Lines and zones appear at the equivalent price on your chart, updating in real time
Built for traders who read SPX flows but execute on other instruments.
リリースノート
Here's everything since v1:Live SPX data pull — replaced hardcoded CSV regression with request.security("SP:SPX") so it auto-calibrates
Rolling regression — slope/intercept recalculate every bar over a configurable lookback window
Padded zones — optional ±10 point shaded zones around each level
Per-level color — each level gets its own color picker
Per-level gamma toggle — Positive / Negative with ⚠ NEG γ label
Per-level Hard Stop — 🛑 STOP label for rejection levels
Per-level zone transparency — individual opacity control instead of global
Configurable line style — Solid / Dashed / Dotted
Configurable line width — 1 to 4
R² info box — live regression stats on chart
Level labels with NQ conversion — each line shows the SPX source and converted value
リリースノート
Regression freeze on cash close — when SPX stops updating after 4pm, the slope/intercept lock in at their last valid values instead of drifting against frozen dataLive/Frozen status indicator — info box shows 🟢 LIVE during cash hours, ❄ FROZEN (cash closed) after hours with aqua text
Line style selector — Solid / Dashed / Dotted dropdown in Style settings (was hardcoded to dashed before)
リリースノート
Fixed double plotting — all lines, boxes, and labels are now deleted and redrawn cleanly on each bar update instead of stacking on top of each otherリリースノート
Two new settings in the Calibration group:Lock Regression Timeframe — on by default
Regression Timeframe — defaults to 5 minutes
リリースノート
Now there's an SPX Symbol picker in the Calibration group. Defaults to SP:SPX but you can switch it to whatever works — CBOE:SPX, AMEX:SPY, CME_MINI:ES1!, etc. Just search for the ticker in the dropdown and pick the one your broker provides.リリースノート
v4 changelog (since v3):5 mapping methods with toggle — Regression, Live Ratio, Pct Offset, Beta-Adjusted, Anchored Session selectable from a dropdown
Live Ratio set as default — uses current NQ/SPX ratio for the most accurate level placement
Configurable SPX symbol — swap between SP:SPX, CBOE:SPX, AMEX:SPY, CME_MINI:ES1!, etc.
Locked regression timeframe — option to fix data pull to a specific timeframe (default 5m) so levels match across all chart timeframes
Dynamic info box per method — shows relevant stats for whichever method is active (ratio, beta, slope/intercept, session anchor, etc.)
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。