OPEN-SOURCE SCRIPT
XAUUSD M5 Hybrid EMA 9/15 (Partial TP + Runner)

This strategy is designed specifically for Gold (XAUUSD) on the 5-minute timeframe, combining trend-following EMAs with rejection-based entries and a dual take-profit system to balance consistency and high-reward opportunities.
⚙️ Strategy Logic
The system uses a 9 EMA and 15 EMA crossover to define short-term trend direction, combined with 15-minute higher timeframe confirmation to filter out low-probability trades.
Buy Conditions:
9 EMA above 15 EMA (M5)
9 EMA above 15 EMA (M15 confirmation)
Strong bullish rejection candle (long lower wick + bullish close)
Sell Conditions:
15 EMA above 9 EMA (M5)
15 EMA above 9 EMA (M15 confirmation)
Strong bearish rejection candle (long upper wick + bearish close)
💰 Trade Management (Key Edge)
Each trade is split into two parts:
TP1 (Partial Close – 50%)
Fixed at ~10 pips (1.0 gold point)
Locks in consistent profits
TP2 (Runner – 50%)
Targets ~50 pips (5.0 gold points)
Includes trailing stop to capture extended moves
Stop Loss
Based on EMA structure with buffer
Dynamic and adaptive to market conditions
🎯 Strategy Objective
This hybrid model is designed to:
Generate frequent small wins
Capture larger trend moves when they occur
Reduce drawdown through partial profit-taking
📊 Best Use Case
Instrument: XAUUSD (Gold)
Timeframe: 5 Minutes
Sessions: London & New York
Market Type: Trending / Volatile conditions
⚠️ Important Notes
This is not a guaranteed high win-rate system
Performance depends heavily on:
Market volatility
Session timing
Spread and execution quality
Backtesting and forward testing are strongly recommended before live use.
🚀 Summary
This strategy combines:
Trend alignment
Price action confirmation
Smart trade management
To create a balanced system between consistency and high-reward trades, making it suitable for disciplined intraday traders.
⚙️ Strategy Logic
The system uses a 9 EMA and 15 EMA crossover to define short-term trend direction, combined with 15-minute higher timeframe confirmation to filter out low-probability trades.
Buy Conditions:
9 EMA above 15 EMA (M5)
9 EMA above 15 EMA (M15 confirmation)
Strong bullish rejection candle (long lower wick + bullish close)
Sell Conditions:
15 EMA above 9 EMA (M5)
15 EMA above 9 EMA (M15 confirmation)
Strong bearish rejection candle (long upper wick + bearish close)
💰 Trade Management (Key Edge)
Each trade is split into two parts:
TP1 (Partial Close – 50%)
Fixed at ~10 pips (1.0 gold point)
Locks in consistent profits
TP2 (Runner – 50%)
Targets ~50 pips (5.0 gold points)
Includes trailing stop to capture extended moves
Stop Loss
Based on EMA structure with buffer
Dynamic and adaptive to market conditions
🎯 Strategy Objective
This hybrid model is designed to:
Generate frequent small wins
Capture larger trend moves when they occur
Reduce drawdown through partial profit-taking
📊 Best Use Case
Instrument: XAUUSD (Gold)
Timeframe: 5 Minutes
Sessions: London & New York
Market Type: Trending / Volatile conditions
⚠️ Important Notes
This is not a guaranteed high win-rate system
Performance depends heavily on:
Market volatility
Session timing
Spread and execution quality
Backtesting and forward testing are strongly recommended before live use.
🚀 Summary
This strategy combines:
Trend alignment
Price action confirmation
Smart trade management
To create a balanced system between consistency and high-reward trades, making it suitable for disciplined intraday traders.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.