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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.