Gold Twin Rider
- Experts
- Versione: 1.0
- Attivazioni: 5
Gold Twin Rider is a rule-based Expert Advisor for XAUUSD that trades both directions. It has two independent entry engines, one for long trades and one for short trades, and each engine holds at most one position, so at times one buy and one sell are open together. Every trade has a stop loss from the moment it is opened and a time limit; short trades also carry a take profit. No martingale, no grid, no averaging down. A real account running the same rules started on 30 November 2026 (link below); the backtest results are shown with their settings and costs and are not forecasts.
Who it is for: traders who want a gold EA that can trade rises and falls, with every trade protected by a stop loss; traders comfortable with a win rate well below 50%, losing streaks of a dozen trades, positions held overnight and an account that allows a buy and a sell on the same symbol at the same time.
At a glance
- Symbol and chart: XAUUSD, M1 chart
- Direction: buy and sell, with two independent entry engines
- Style: trend following: frequent small losses, fewer but larger wins
- Protection: stop loss on every order, including the pending order the EA may place on the broker's server; take profit on short trades; a time limit on every trade
- Positions: at most one long and one short at a time; trades can stay open overnight
- Account: must allow a buy and a sell on the same symbol at the same time (hedging)
- Time zones: adapts to your broker's server time automatically
- Backtest averages: about 19 trades per month; median holding time about 10.5 hours
- Not used: martingale, grid, averaging down, DLL, AI
How it works
- Two engines: A long engine and a short engine watch the market independently. Each waits for its own conditions and each can be switched off in the inputs.
- Enters with protection: The stop loss is part of the order request, and the EA checks the stops against the broker's minimum stop distance before sending. If the broker rejects stops in the order request, the EA opens the trade and attaches them right after; a trade that still has no stop loss is closed by the EA. After a connection timeout the EA waits to confirm the order instead of sending it again.
- Server-side entry: The long engine can place a buy stop order with its stop loss already attached, so the entry does not depend on the terminal alone. The order is removed when it is no longer valid.
- Management and exit: Short trades carry a take profit and move the stop to the entry price once the trade has moved in their favour. A trade that has not reached its stop or target is closed after a fixed time.
The two engines are not a hedge of each other: every trade stands on its own stop loss. When gold swings sharply in both directions without a clear move, both engines can lose in the same period.
Backtest results
MetaTrader 4 Strategy Tester, hypothetical, not live trading. Gold Twin Rider version 1.0, XAUUSD M1, Every tick, modelling quality 99.90%, variable spread, 2025.03.02 - 2026.11.27, deposit 2,000 USD, fixed 0.01 lot.
- Trades: 398 (169 long, 229 short)
- Profit factor: 1.88
- Net profit: 4,043.31 USD
- Maximal drawdown: 241.46 USD
- Average profit / loss trade: 65.99 / -17.23 USD
- Longest losing streak: 12 trades in a row
Commission is not included in the tester result; at 7 USD per lot round turn it is about 27.86 USD for the 3.98 lots traded.
With risk 1% per trade on 2,000 USD the same test period gives a net profit of 5,490.00 USD and a maximal drawdown of 7.29%.
With the same trades, profit and drawdown in USD change roughly in proportion to the lot size; margin, costs and lot rounding can change the result.
Live monitoring
Real account running this strategy (MQL5 Signals): https://www.mql5.com/en/signals/2402183
That account runs the same trading rules and started on 30 November 2026, so it is still far too short to judge the EA.
Setup
- Attach the EA to an XAUUSD M1 chart and enable AutoTrading.
- Use an account that allows a buy and a sell on the same symbol at the same time (hedging). Netting or FIFO accounts are not suitable.
- Use a low-spread account (ECN or raw spread) and a VPS. Results depend on your broker's spread, commission, slippage and swap.
- Keep the default settings (fixed 0.01 lot) to match the published test, or set Risk per trade, for example 0.5% or 1%, for balance-based sizing (see the FAQ).
- Suggested balance: 2,000 USD or more for each 0.01 lot (largest drawdown in the published test 241.46 USD, about 12% of 2,000 USD). Smaller balances raise the risk accordingly.
- Start on a demo account with the smallest lot.
Input parameters
Position sizing:
- Risk per trade, % of balance - default 0. 0 uses the fixed lot. Above 0 the lot is calculated from the stop distance so that the planned stop-loss risk matches this percentage; signals are skipped when the broker's minimum lot would exceed it.
- Fixed lot size - default 0.01. Used when the risk is 0. If it is below the broker's minimum lot, the minimum lot is used.
Directions:
- Trade long setups - default true. Switches the long entry engine on or off.
- Trade short setups - default true. Switches the short entry engine on or off.
Filters:
- Max spread to open a trade - default 0 (off). In price units: 1.50 means 1.50 USD on XAUUSD. 0 turns the filter off.
- Gold (XAUUSD) must be above this price - default 3000. Applies to gold symbols only; 0 turns it off. Open trades continue to be managed.
- Max slippage, points - default 30.
Broker time:
- Detect broker GMT offset automatically - default true. Used on live and demo accounts.
- Broker GMT offset, hours - default 0. Used in the Strategy Tester or when detection is off: 0 for a GMT+0 server, 2 or 3 for GMT+2 or GMT+3.
Order tagging and alerts:
- Magic number - default 2615001. One number for both directions. Must be above 0. Change it if another EA on the account uses the same number.
- EA drawdown alert - default 0 (off). Shows an alert when the EA's own drawdown, closed and open trades together, exceeds this amount in account currency. Alert only: the EA keeps trading.
Strategy Tester and other charts
Test on XAUUSD, M1, model "Every tick", with complete history; real tick data from your broker gives the most reliable result. Use the default settings to reproduce the published test. The free demo of this product runs in the Strategy Tester, so you can check it on your broker's price data before buying.
Enter your server's offset in the Broker GMT offset input; the EA cannot detect it in the tester.
Attaching the EA to another symbol or changing to a timeframe other than M1 activates a different, simplified strategy on the chart's own bars, with a stop loss and take profit on every order and one position at a time. It is not covered by the published results, and the gold price filter does not apply to it. All recommendations refer to XAUUSD M1.
FAQ
Why is the EA not opening trades? The status panel on the chart shows the current state and the reason for the last skipped signal, for example: its own time conditions are not met yet (check the broker GMT offset input); the price of gold is below the minimum gold price input (3000 by default); the spread is above the limit; the broker's minimum lot would exceed the risk setting (risk % mode); chart history is still loading. Also check that AutoTrading is enabled.
Fixed lot or risk %? The default fixed 0.01 lot is the setting of the published test. Risk % sizes each trade from its stop distance. Percentage sizing targets the planned stop-loss risk at order entry. Signals are skipped when the broker's minimum lot exceeds that budget. Slippage, gaps, fees and overnight costs can cause realised losses to exceed the planned amount.
Are losing streaks normal? Yes. In the published test the longest losing streak was 12 trades in a row. Size the account so that such a streak is acceptable.
Which GMT offset should I use? On live and demo accounts the offset is detected from the clock and shown in the Experts tab when the EA starts and whenever it changes. In the Strategy Tester enter your server's offset manually; for servers that switch between GMT+2 and GMT+3, tester results are approximate.
Can I run it together with other EAs? Yes, with a different magic number for each EA. Each EA manages only its own trades; the total exposure of several EAs is not limited automatically.
Why can it hold a buy and a sell at the same time? The long and the short engine work independently, and each can hold one position. When both find a trade, one buy and one sell are open together, each with its own stop loss. Your account must allow this (hedging). Netting or FIFO accounts that keep only one net position per symbol are not suitable.
Can I trade only one direction? Yes. Trade long setups and Trade short setups switch each engine on or off. The published test runs both; with one engine the results differ from the published ones.
Does it hold trades overnight? Yes. Most trades last hours, and a trade that is still open is closed after about one day at the latest, so many trades stay open overnight. Swap applies, and a gap at the market open can fill a stop loss at a worse price than planned.
Why is the win rate low? 32.9% of the trades in the published test were winners. Most trades end with a small loss, and fewer, larger wins pay for them. This needs patience and an account sized for losing streaks.
How should I read the backtest? The published test covers March 2025 to November 2026, a period in which gold traded above 3000 with high volatility, and the result is concentrated in it. In earlier years at lower gold prices the same rules did not show a profit in our tests, which is why the default price filter keeps the EA out of the market below 3000. The three best months produced about 35% of the net profit. Past or simulated results do not guarantee future results; judge the EA over many months and size the account for a losing streak.
Support
For questions and help with the setup, send me a private message on MQL5 or write in the Comments tab of this product.
Risk warning. Trading leveraged products such as gold CFDs carries a high level of risk and may result in the loss of your entire deposit. Backtest results are hypothetical and do not guarantee future results. Test on a demo account first and trade only with money you can afford to lose.
