GoldIBH MT5
- Experts
- Thanh Trung Tran
- Versione: 1.0
- Attivazioni: 5
GoldIBH MT5 combines three complementary gold strategies in one MetaTrader 5 Expert Advisor. Each one looks for a different market situation and manages its own position and stop loss, so the EA can find opportunities in more conditions than a single-rule EA. The same trading rules run the GoldIBH signal on MQL5, so you can watch the strategy on a real account before you buy. Historical test results are shown below with their settings and costs; they are not forecasts.
Also available for MetaTrader 4: GoldIBH - https://www.mql5.com/en/market/product/207926
Who it is for
- Traders who want three different gold strategies working together in one EA
- Traders comfortable with a low win rate offset by larger winners
At a glance
- Platform: MetaTrader 5
- Symbol and chart: XAUUSD, M1 chart
- Strategies: three, each with its own entries, exits and stop loss
- Style: small, controlled losses and larger winners; winners can run
- Positions: at most one per strategy, three in total
- Time zones: adapts to your broker's server time automatically
- Account type: MetaTrader 5 hedging account for the full EA (each strategy keeps its own position)
- Backtest averages: about 16 trades per month; median holding time about 8.5 hours
- Money management: fixed lot (default 0.01) or risk % per trade
- Gold price filter: new trades only while gold is above 3000 (adjustable input)
- Status panel: the chart shows the mode, open positions and the reason for the last skipped signal
- Not used: martingale, grid, averaging down, DLL, AI
How it works
- Three strategies. Each strategy waits for its own market situation and works independently.
- Enters with protection. The stop loss (and the take profit, if any) are 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.
- Lets winners run. Depending on the strategy, a trailing stop, a fixed target or break-even protection manages the open trade.
Each strategy can be turned off in the inputs. With all three on, up to three positions can be open at the same time, so size the account for all three.
Setup
- Attach the EA to an XAUUSD M1 chart and enable Algo Trading.
- Account type: a MetaTrader 5 hedging account is required for the full EA. On a netting account only one position can be open at a time, so the trades differ from the published test.
- Use a low-spread account (ECN or raw spread) and a VPS. Results depend on your broker's spread, commission, slippage and swap.
- Default settings (fixed 0.01 lot) are the settings of the published test.
- Balance-based sizing: set Risk per trade, for example 0.5% or 1%. 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.
- Suggested balance: 2,000 USD or more for each 0.01 lot per strategy (largest equity drawdown in the published test 507.17 USD, about 25% of 2,000 USD).
- Start on a demo account with the smallest lot.
Input parameters
- 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 per strategy - default 0.01. Used when the risk is 0. If it is below the broker's minimum lot, the minimum lot is used.
- Max spread for strategies 1 and 3 - default 1.50. 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.
- 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.
- Strategy 1 (on/off) - default true. Turns strategy 1 on or off.
- Strategy 2 (on/off) - default true. Turns strategy 2 on or off.
- Strategy 3 (on/off) - default true. Turns strategy 3 on or off.
- Magic number - default 26111205. Must be above 0. Strategy 1 uses this number, strategies 2 and 3 use the next two numbers (this number + 1 and + 2), so keep all three free from other EAs on the account.
Backtest results (MetaTrader 5 Strategy Tester, one broker's real tick history, hypothetical, not live trading)
- Conditions: GoldIBH MT5 version 1.0, XAUUSD M1, Every tick based on real ticks, history quality 100%, spread, commission and swap of the test account
- Period: 2025.01.01 - 2026.11.18
- Deposit and sizing: 10,000 USD, fixed 0.01 lot
- Trades: 326 (175 long, 151 short)
- Profit factor: 1.99
- Net profit: 3,838.03 USD
- Maximal drawdown: 507.17 USD (4.80%) on equity, 409.17 USD (3.90%) on balance
- Average profit / loss trade: 79.62 / -16.91 USD
- Longest losing streak: 12 trades in a row
- Commission and swap: included in the result (commission -13.04 USD, swap -107.00 USD, 3.26 lots traded)
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. Other brokers have different prices, spreads, commissions and swaps, so their results differ.
Live monitoring
Real account running the same trading rules (MQL5 Signals): https://www.mql5.com/en/signals/2396981
That account runs the MetaTrader 4 version of the same trading rules. It is the author's commercial signal account and trades a larger lot than the default of this EA, so its swings are larger than the published test. Want to watch the account in real time? Send me a private message on MQL5 and I will share read-only (investor) access.
More from the author (MetaTrader 5)
- Gold Momentum Breakout MT5 - momentum, long and short: https://www.mql5.com/en/market/product/209325
- GoldSwing T24 MT5 - trend trading, every trade closed within 24 hours: https://www.mql5.com/en/market/product/209324
- Gold Entry MT5 - two trend systems in one EA (hedging account): https://www.mql5.com/en/market/product/209327
- UT Bot Alerts with Signal Stats MT5 (free indicator): https://www.mql5.com/en/market/product/209458
- Range Filter Buy Sell with Signal Stats MT5 (free indicator): https://www.mql5.com/en/market/product/209459
- Chandelier Exit with Signal Stats MT5 (free indicator): https://www.mql5.com/en/market/product/209460
- Adaptive SuperTrend KMeans MT5 (free indicator): https://www.mql5.com/en/market/product/209466
- Tester vs Live Trade Matcher MT5 (free utility): https://www.mql5.com/en/market/product/209467
Other charts
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.
Testing in the Strategy Tester
- XAUUSD, M1, model "Every tick based on real ticks". 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 Broker GMT offset, hours; the EA cannot detect it in the tester.
- The tester uses the account type of the account you are logged in to; use a hedging account to reproduce the published test.
- On other timeframes the tester shows the chart-mode strategy described above.
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 Algo Trading 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 logged once a day in the Experts tab. 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.
- What happens on other timeframes? On a chart other than M1 the EA runs a different, simplified chart-mode rule that is not covered by the published results. Use the recommended chart.
- How do I update the EA? Update when no position is open.
- Does it use AI? No. It follows fixed, rule-based logic.
- Can I run only one or two of the strategies? Yes. Turn the others off in the inputs; the published test uses all three.
- Which magic numbers does the EA use? Strategy 1 uses the magic number from the inputs, strategies 2 and 3 use that number + 1 and + 2. Give other EAs on the account different numbers.
- Do I need a hedging account? Yes, for the full EA. Each strategy keeps its own position, which a MetaTrader 5 netting account cannot do. On a netting account the EA still runs, but only one position can be open at a time.
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, come from one broker's price history and do not guarantee future results. Test on a demo account first and trade only with money you can afford to lose.
Support
For questions and help with the setup, send me a private message on MQL5 or write in the Comments tab of this product.
