Xauusd Gold 1M Scalper Pro MT5
- Uzmanlar
- Prashant Prabhakar Sable
- Sürüm: 3.21
- Etkinleştirmeler: 10
XAUUSD Gold 1M Scalper MT5
This Expert Advisor is designed for Gold (XAUUSD) on the 1-minute timeframe in MetaTrader 5. It uses a multi-timeframe trend filter combined with a momentum indicator and a volatility-based entry condition to select trade entries during the London and New York trading sessions.
Strategy Overview
A trade opens only when three conditions align simultaneously: the higher timeframe EMA alignment confirms the broader trend direction, the 1-minute Supertrend matches that direction, and the Stochastic Oscillator provides a valid entry timing signal. Stop loss and take profit levels are set dynamically using the Average True Range.
- Supertrend - ATR-based trend direction on the 1-minute chart. Detects trend flips and stable continuation.
- Stochastic Oscillator - Entry timing. Oversold recovery for buy entries, overbought decline for sell entries.
- EMA Alignment (Higher Timeframe) - Two moving averages on M5 or higher filter entries to match the broader trend only.
- ATR (Average True Range) - Sets dynamic stop loss and take profit. Also filters out low-activity periods.
Backtest Information
The EA was tested on historical XAUUSD data from January 2020 to April 2026 using Exness MT5 data at 78% tick quality, build 5800, with an initial deposit of 100 USD and leverage of 1:400.
These figures reflect a historical simulation only. Past backtest results do not represent real trading performance and do not indicate future results.
| Metric | Result |
|---|---|
| Total trades | 13,491 |
| Winning trades | 11,752 |
| Win rate | 87.11% |
| Long win rate | 86.85% |
| Short win rate | 87.43% |
| Profit factor | 4.72 |
| Max equity drawdown | 7.84% |
| Recovery factor | 280.80 |
| Average trade duration | 41 seconds |
| Max consecutive wins | 89 |
| Max consecutive losses | 6 |
Built-in Risk Controls
- Daily loss limit - Trading stops and open positions are closed when equity falls below a set percentage of the day-start balance.
- Balance recovery unlock - Trading resumes automatically if the account balance recovers above the day-start level from closed trades.
- Breakeven - Stop loss moves to entry price once the trade reaches a defined profit level in points.
- Trailing stop - Stop loss follows price in configurable steps after a minimum profit threshold is reached.
- Session filter - Entries limited to London and New York session hours. Asian session excluded by default.
- Spread filter - Entries skipped when current spread exceeds a configurable threshold.
- ATR volatility filter - Entries skipped when ATR is below a minimum value, indicating low market movement.
- Daily trade limit - EA stops opening new trades after a set number per day.
Requirements
| Item | Value |
|---|---|
| Platform | MetaTrader 5 |
| Symbol | XAUUSD (Gold) |
| Timeframe | M1 (1 minute) |
| Minimum deposit | 100 USD (500 USD or more suggested) |
| Account type | Hedging mode |
| Tested on | Exness Zero Account |
Settings Guide
Each parameter is shown as: Name = default_value | range | what it does.
[ Sanity Test ]
inp_SanityTest = false
Set to true only for MQL5 marketplace validation. Places 2 test trades and exits. Must be false for all live and demo use.
[ Debug ]
inp_Debug = true
Prints bar-by-bar signal information to the Journal tab. Useful during setup. Turn off in live trading to reduce journal output.
inp_DebugVerbose = false
Prints raw indicator values every bar. For detailed inspection only. Produces heavy output.
[ Supertrend ]
inp_ST_Period = 7 | range 5-21
ATR period used for the Supertrend band. Lower values produce more signals. Higher values produce fewer, stronger signals.
inp_ST_Mult = 2.0 | range 1.5-4.0
ATR multiplier for band width. Lower creates tighter bands with more direction changes. Higher creates wider bands and stronger filtering.
[ Stochastic ]
inp_Stoch_K = 5 | range 3-14 - K period.
inp_Stoch_D = 3 | range 3-5 - D smoothing period.
inp_Stoch_Slow = 3 | range 3-5 - Slowing period.
inp_Stoch_OB = 65.0 | range 60-80 - Overbought level. Sell entry considered when K crosses below this.
inp_Stoch_OS = 35.0 | range 20-40 - Oversold level. Buy entry considered when K crosses above this.
[ Higher Timeframe Filter ]
inp_HTF = PERIOD_M5
Timeframe used for EMA trend alignment check. Must be higher than the chart timeframe. M5 or M15 suggested.
inp_HTF_EMA = 50 | range 20-100 - Faster EMA on the higher timeframe.
inp_HTF_EMA2 = 200 | range 100-200 - Slower EMA. Buy condition: price above both EMAs, faster above slower. Sell: reverse.
[ Risk Management ]
inp_RiskPct = 1.0 | range 0.5-2.0
Percentage of account balance used to calculate lot size per trade.
inp_ATR_Period = 14 | range 10-20 - ATR period for stop loss and take profit distances.
inp_ATR_Min = 0.40 | range 0.20-1.00 - Minimum ATR to allow entry. Entries skipped below this value.
inp_ATR_SL_Mult = 1.2 | range 1.0-2.0 - Stop loss = ATR multiplied by this value.
inp_RR_Ratio = 2.0 | range 1.5-3.0 - Take profit = stop loss distance multiplied by this value.
inp_MaxSpread = 30.0 pts | range 15-50 - Max spread allowed at entry. Note: backtest used 100 points.
inp_MaxDailyLoss = 3.0% | range 2.0-5.0 - Max equity drop from day-start balance. EA locks until balance recovers.
inp_MaxDailyTrades = 15 | range 5-30 - Maximum number of trades allowed per day.
[ Position Management ]
inp_UseBreakeven = true - Moves stop loss to entry price at breakeven profit level.
inp_BreakevenPts = 20.0 | range 10-50 - Points of profit needed to trigger breakeven.
inp_UseTrailing = true - Enables trailing stop after threshold is reached.
inp_TrailingStart = 30.0 | range 20-80 - Points of profit needed to activate trailing.
inp_TrailingStep = 10.0 | range 5-20 - Stop loss moves in steps of this size as price advances.
[ Session Filter ]
inp_UseSessions = true - Limits entries to London and New York hours only.
inp_LondonOpen = 8 | inp_LondonClose = 17 - London session in broker server time.
inp_NYOpen = 13 | inp_NYClose = 20 - New York session in broker server time.
All hours are broker server time. Example: UTC+3 broker means London open = 10, New York open = 16.
[ Direction and Identification ]
inp_EnableBuy = true - Allow buy entries.
inp_EnableSell = true - Allow sell entries. Either direction can be disabled independently.
inp_MagicNumber = 202500003 - Unique trade identifier. Change if running another EA on the same account. Do not change while a trade is open.
inp_Comment = "XAUUSD_v3d" - Label attached to each trade in terminal history.
Suggested Settings by Use Case
| Use Case | RiskPct | MaxDailyLoss | MaxDailyTrades | ATR_Min | MaxSpread |
|---|---|---|---|---|---|
| Conservative | 0.5 | 2.0% | 10 | 0.50 | 25 pts |
| Balanced | 1.0 | 3.0% | 15 | 0.40 | 30 pts |
| Prop Firm Account | 0.5 | 2.0% | 8 | 0.50 | 25 pts |
| Backtesting | Debug=false, DebugVerbose=false, SanityTest=false | ||||
Important Notes
- Attach this EA to a XAUUSD M1 chart only.
- A deposit of 200 USD or more is suggested for standard accounts. Cent accounts are supported.
- Session hours are in broker server time. Verify your broker server clock before configuring session values.
- inp_SanityTest must be false for live and demo trading. It is a marketplace validation utility only.
- Use a different magic number for each EA instance on the same account.
- The backtest used inp_MaxSpread = 100 points. The recommended value for live trading is 30 points.
Disclaimer
This Expert Advisor does not guarantee any level of profit or protect against financial loss. Backtest results are based on historical data and simulated conditions. They do not represent real account performance and are not an indication of future results. Live results will differ due to slippage, spread variation, and changing market conditions. Trading involves risk. Only use capital that you are prepared to lose. Always test on a demo account before using on a live account.
