OPEN-SOURCE SCRIPT

Gold Timing Composite (EURUSD + DXY + US02Y)

51
Here's the publication-ready description for TradingView:

Gold Timing Composite Indicator - 3-Component Model
Overview
A precision-engineered multi-component oscillator designed specifically for intraday gold trading. This indicator synthesizes three critical market drivers—EUR/USD dynamics, broad US Dollar strength, and Treasury yield movements—to isolate genuine gold price catalysts from market noise, delivering high-probability timing signals through triple-layer confirmation.

Components & Methodology
The indicator employs z-score normalization (default 20-period lookback) to harmonize three distinct but correlated market signals into a unified composite reading:
Fast Price Discovery Signal (40%):

EURUSD (40%) - EUR/USD captures rapid USD repricing with the deepest FX liquidity globally

Broad USD Strength Confirmation (35%):

-DXY (35%) - Inverted US Dollar Index measures comprehensive USD strength across six major currencies (EUR 57%, JPY 14%, GBP 12%, CAD 9%, SEK 4%, CHF 4%)

Real Yield Proxy (25%):

-US02Y (25%) - Inverted 2-Year Treasury yield captures Fed policy expectations and real rate dynamics


Key Features
✅ Dual USD Validation - EURUSD (speed) + DXY (breadth) filter EUR-specific moves from true USD weakness
✅ Real Yield Sensitivity - US02Y isolates rate-driven gold moves from pure currency effects
✅ Triple Confirmation System - Visual alignment dots when all three components agree simultaneously
✅ Mean-Reversion Zones - Overbought/oversold thresholds at ±1.5 standard deviations
✅ Clean Visualization - Candle-based display (no wicks) for rapid pattern recognition
✅ EUR/USD Divergence Detection - Identifies when EURUSD moves are EUR-specific vs broad USD moves

How to Use
Basic Signals:

Green candles = Bullish gold pressure (USD weakening / yields falling)
Red candles = Bearish gold pressure (USD strengthening / yields rising)
Above +1.5 = Overbought zone → look for mean-reversion shorts
Below -1.5 = Oversold zone → look for mean-reversion longs

High-Confidence Setups (Alignment Dots):

Lime dot at top = All 3 components bullish → maximum gold long confidence
Magenta dot at bottom = All 3 components bearish → maximum gold short confidence
No dots = Components diverging → reduce position size or wait for clarity

Divergence Trading:

Gold makes new high but composite doesn't confirm → potential reversal down
Gold makes new low but composite doesn't confirm → potential reversal up


Understanding Component Interactions
Normal Correlation (High Confidence):

EURUSD ↑ + DXY ↓ + US02Y ↓ → Broad USD weakness + falling yields → Strong gold bull signal
EURUSD ↓ + DXY ↑ + US02Y ↑ → Broad USD strength + rising yields → Strong gold bear signal

EURUSD/DXY Divergence (Critical Filter):

EURUSD ↑ but DXY flat/up → EUR-specific strength (ECB, Eurozone news) → Weak gold signal

DXY flat = USD not actually weak, just EUR strong → Gold may not follow EURUSD


EURUSD flat but DXY ↓ → Broad USD weakness (JPY, GBP, CAD all strong) → Strong gold signal

True USD weakness beyond just EUR → High-probability gold long



FX vs Yields Divergence:

EURUSD ↑ + DXY ↓ but US02Y ↑ → USD weak in FX but yields rising → Mixed signal

Hawkish Fed repricing vs currency weakness → Medium confidence, smaller size


EURUSD ↓ + DXY ↑ but US02Y ↓ → USD strong but yields falling → Conflicting drivers

Could be risk-off (safe haven bid to Treasuries) → Analyze broader market context




Best Practices
Timeframes: 5-minute to 15-minute charts for intraday trading
Session Focus: London fix (10:30 AM GMT) and New York open (8:20 AM EST) for peak gold liquidity
Pair With:

Key gold technical levels (round numbers, previous highs/lows)
COMEX gold futures volume profile
Real yield charts (when available)
VIX for risk sentiment context

Risk Management:

Full position: When alignment dots appear (all 3 components agree)
Half position: When 2 of 3 components align
Wait/reduce: When all three components diverge

Weight Adjustments:

Fed announcement days (FOMC, CPI, NFP): Increase US02Y to 35%, reduce EURUSD to 35%
ECB policy days: Monitor EURUSD/DXY divergence closely (EUR-specific moves may not affect gold)
Geopolitical events: DXY and yields may diverge (safe-haven flows) → Focus on DXY + yields, reduce EURUSD weight
Asian session: EURUSD less reliable (lower liquidity), consider increasing DXY weight to 45%


Technical Details
Calculation Method: Z-score normalization with configurable lookback period
Default Weights: EURUSD 40% | -DXY 35% | -US02Y 25%
Extreme Threshold: ±1.5 standard deviations (adjustable)
Alignment Trigger: All 3 components in unanimous agreement
Customizable Parameters:

Z-score lookback period (default: 20)

15-20: Faster, more sensitive (intraday focus)
30-50: Slower, smoother (swing trade context)


Individual component weights
Extreme threshold levels (1.3 for more signals, 1.8 for extremes only)
Alignment indicator toggle


Advantages Over Simple Indicators
Unlike single-instrument or DXY-only indicators, this composite:

Filters EUR-specific noise - When EURUSD moves but DXY doesn't confirm, gold often doesn't follow
Combines speed + breadth - EURUSD for fast entries, DXY for broad confirmation
Isolates real yield drivers - US02Y separates rate-driven moves from pure FX effects
Identifies regime shifts - When FX and yields diverge, signals changing market dynamics
Adaptable weighting - Adjust for different sessions, events, or market regimes


Real-World Signal Examples
Example 1: High-Confidence Long (All Aligned)

Fed dovish surprise → US02Y falls sharply
USD sells off → EURUSD rises + DXY falls
Composite surges, lime dot appears
Action: Full position gold long

Example 2: False Signal (EUR-Specific)

ECB hawkish statement → EURUSD rallies
But DXY unchanged (JPY, GBP, CAD not moving)
US02Y also unchanged
Composite rises but no alignment dot
Action: Small/no gold position (move is EUR-specific, not USD weakness)

Example 3: Mixed Signal (FX vs Yields)

Strong US jobs data → US02Y spikes (bearish gold)
But USD sells off in FX → EURUSD up + DXY down (bullish gold)
Composite shows divergence, no dots
Action: Wait for clarity or trade with tight stops

Example 4: Divergence Entry

Gold makes new intraday high
But composite fails to confirm (makes lower high)
Bearish divergence forms
Action: Short gold on next pullback


Suggested Complementary Analysis
Fundamental:

Fed vs ECB policy divergence and forward guidance
Real yield trends (10Y TIPS when available)
Inflation expectations (breakevens)
Central bank balance sheet changes
Geopolitical risk premium

Technical:

Gold futures COT (Commitment of Traders) positioning
COMEX gold open interest
Gold/Silver ratio
Mining stock performance (GDX, GDXJ)

Intermarket:

US equity market performance (risk-on/risk-off context)
Crude oil (inflation proxy)
Copper (growth expectations)
Bitcoin correlation (alternative store of value narrative)


Limitations & Considerations
When the Indicator Struggles:

Flash crashes or circuit breakers - Extreme events can break normal correlations temporarily
Asian session gaps - Lower EURUSD liquidity can cause false signals
Central bank interventions - SNB or BOJ FX intervention distorts DXY temporarily
Geopolitical shocks - Gold can decouple from USD/yields during wars, crises (safe-haven bid)
Quarter-end flows - Rebalancing can create temporary USD moves unrelated to fundamentals

Best Used When:

Normal market conditions (liquid sessions, no major shocks)
Clear trending or mean-reverting environment
Components showing consistent correlations
Combined with price action and volume confirmation


Performance Optimization Tips

Backtest your timeframe - Test 15-25 lookback periods to find optimal sensitivity
Session-specific weights - Use different weight profiles for London vs New York vs Asia
Combine with price action - Don't trade composites alone; wait for gold to confirm with candle patterns
Monitor component correlations - If EURUSD/DXY correlation breaks down, reduce both weights temporarily
Use with stop-loss discipline - Composite extremes suggest mean-reversion, but trends can extend


Disclaimer
This indicator is a technical analysis tool and does not guarantee profitable trades. Gold markets are influenced by numerous factors including geopolitics, central bank policy, inflation, and market sentiment that cannot be fully captured by any indicator. Always employ proper risk management, position sizing, and stop-losses. Backtest thoroughly before live implementation. Past performance is not indicative of future results.

Credits
Developed for intraday precious metals traders seeking multi-factor confirmation for gold timing decisions. Built on intermarket analysis principles combining currency dynamics, interest rate differentials, and statistical normalization for robust signal generation. Designed to filter EUR-specific noise and isolate true USD weakness—the primary driver of gold price movements.
Version: 1.0
Pine Script Version: 6
Asset Class: Precious Metals (Gold, Silver)
Category: Oscillators, Multi-Timeframe Analysis, Intermarket Analysis
Use Case: Intraday mean-reversion and momentum timing for gold (XAUUSD, GC futures)

Trading gold with this indicator? Share your results, questions, or improvement suggestions in the comments!

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.