OPEN-SOURCE SCRIPT
EMA Crossover Strategy [15M]

EMA Crossover Strategy [15M] — Stats Panel + Pip/$ Tracking + Chop Filter
A clean, rules-based EMA crossover strategy built for XAUUSD (Gold) on the 15-minute timeframe, with multi-timeframe signal confirmation, dynamic risk/reward boxes, and a full live stats panel.
🔧 How It Works
Signals are generated when the Fast EMA (5) crosses the Slow EMA (13) on the higher timeframe. The stop loss is placed at the EMA intersection point, and the take profit is calculated automatically using your chosen Risk:Reward ratio (default 2:1).
📊 Features
✅ Multi-timeframe EMA crossover detection (no repainting)
✅ Dynamic SL placed at EMA intersection — not a fixed pip distance
✅ Automatic TP calculated from your RR ratio
✅ Visual Risk/Reward boxes anchored by time (stay pinned when scrolling/zooming)
✅ VWAP filter — only takes longs above VWAP, shorts below
✅ ADX chop filter — avoids sideways markets below your ADX threshold
✅ EMA separation filter — skips signals when EMAs are too close together
✅ Stats panel (bottom left) — total trades, win rate, net RR, pips captured/lost, net $/oz
✅ Active trade panel (top right) — live entry, SL, TP, risk in pips and price
✅ JSON alerts for webhook/bot integration
✅ TP ✓ and SL ✗ hit labels on chart
⚙️ Inputs
SettingDefaultDescriptionHigher Timeframe15MHTF for EMA signalsFast EMA5Fast EMA lengthSlow EMA13Slow EMA lengthRR Ratio2.0Risk:Reward multiplierVWAP FilterOnTrend direction filterADX FilterOnChop/sideways filterADX Threshold20Minimum ADX for a valid signalEMA Sep FilterOnMinimum EMA gap filterPip Size0.1Set to 0.1 for XAUUSD (OANDA)
📌 Notes
Built and optimised for XAUUSD on OANDA — adjust pip size for other brokers or instruments
Uses barmerge.lookahead_off to prevent repainting
Drawings are anchored by time (xloc.bar_time) so they stay correctly positioned when scrolling or changing zoom
Alerts fire in JSON format — ready for webhook or bot automation
⚠️ Disclaimer
This script is for educational and informational purposes only. Past performance is not indicative of future results. Always manage your own risk.
A clean, rules-based EMA crossover strategy built for XAUUSD (Gold) on the 15-minute timeframe, with multi-timeframe signal confirmation, dynamic risk/reward boxes, and a full live stats panel.
🔧 How It Works
Signals are generated when the Fast EMA (5) crosses the Slow EMA (13) on the higher timeframe. The stop loss is placed at the EMA intersection point, and the take profit is calculated automatically using your chosen Risk:Reward ratio (default 2:1).
📊 Features
✅ Multi-timeframe EMA crossover detection (no repainting)
✅ Dynamic SL placed at EMA intersection — not a fixed pip distance
✅ Automatic TP calculated from your RR ratio
✅ Visual Risk/Reward boxes anchored by time (stay pinned when scrolling/zooming)
✅ VWAP filter — only takes longs above VWAP, shorts below
✅ ADX chop filter — avoids sideways markets below your ADX threshold
✅ EMA separation filter — skips signals when EMAs are too close together
✅ Stats panel (bottom left) — total trades, win rate, net RR, pips captured/lost, net $/oz
✅ Active trade panel (top right) — live entry, SL, TP, risk in pips and price
✅ JSON alerts for webhook/bot integration
✅ TP ✓ and SL ✗ hit labels on chart
⚙️ Inputs
SettingDefaultDescriptionHigher Timeframe15MHTF for EMA signalsFast EMA5Fast EMA lengthSlow EMA13Slow EMA lengthRR Ratio2.0Risk:Reward multiplierVWAP FilterOnTrend direction filterADX FilterOnChop/sideways filterADX Threshold20Minimum ADX for a valid signalEMA Sep FilterOnMinimum EMA gap filterPip Size0.1Set to 0.1 for XAUUSD (OANDA)
📌 Notes
Built and optimised for XAUUSD on OANDA — adjust pip size for other brokers or instruments
Uses barmerge.lookahead_off to prevent repainting
Drawings are anchored by time (xloc.bar_time) so they stay correctly positioned when scrolling or changing zoom
Alerts fire in JSON format — ready for webhook or bot automation
⚠️ Disclaimer
This script is for educational and informational purposes only. Past performance is not indicative of future results. Always manage your own risk.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.