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.
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.