Institutional ES VWAP Projected to SPX (Fair-Value Spread Lock)

20
Title: Institutional ES VWAP Projected to SPX (Fair-Value Spread Lock)

Tags: VWAP, SPX, ES, Microstructure, Divergence, Spread, Volume

Description:

The Core Problem
Applying a standard Volume Weighted Average Price (VWAP) directly to the S&P 500 Index (SPX) or a 24-hour SPX CFD (like Forex.com/OANDA) presents a severe microstructure problem:

The SPX cash index has no native intraday volume.

CFD volume is fragmented and internal to the retail broker, rendering CFD VWAP structurally misleading.

SPX cash data halts entirely during the Globex overnight session, making continuous 24-hour calculations impossible.

The Mechanical Solution
This indicator solves this by acting as a data bridge. It pulls true, centralized institutional volume and VWAP from the CME E-mini Futures (ES1!) and projects it directly onto your SPX cash or CFD chart using a dynamic fair-value spread lock.

During Regular Trading Hours (RTH): The script calculates the live, tick-for-tick spread between ES and SPX.

During Globex (Overnight): Because the SPX cash index stops updating, the script "locks" the final cash-close spread into memory. It then continuously subtracts this locked fair-value spread from the live, 24-hour ES VWAP.

The result is a perfectly synthesized, institutional-volume-backed VWAP line that tracks continuously across 24-hour CFD charts without dropping data overnight.

Trading Application: Microstructure Divergences
Because this indicator explicitly measures the fair-value spread between futures and cash, it doubles as a liquidity divergence tool:

The Low-Volume Squeeze: If price is rallying aggressively but the projected VWAP line flatlines or hooks downward, it indicates a low-liquidity environment where the derivatives book (ES) is outrunning the cash index on zero structural volume.

When you see the Projected VWAP hook inversely to price action, it confirms the move lacks transactional gravity and is actively stretching the fair-value spread.

Features & UI

Chart Guard: The script detects the host ticker. It will safely hide the VWAP line and display a warning HUD if applied to a non-S&P chart (like AAPL) to prevent annihilating the Y-axis scale.

Telemetry HUD: A customizable dashboard tracks the raw ES VWAP, the projected SPX VWAP, and the current state of the spread (Live vs. Locked).

Floating Labels: Includes an adaptive "ES VWAP CONV" line-termination label with full user color/style controls.

Technical Note for Script Reviewers regarding request.security
This script utilizes request.security with close[1] and barmerge.lookahead_on exclusively to fetch the daily fallback spread data without introducing repainting on historical intraday bars. All real-time RTH spread calculations and VWAP projections are anchored to the current bar state to ensure strict execution fidelity.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.