Home > Blog > XAUUSD EA Settings Guide

XAUUSDEA SettingsGold EAMT5Risk Management

XAUUSD EA Settings Guide

Published: 2026-10-02Read time: about 4 min
⏱ This article reflects information as of its publish date. EA performance figures (PF, DD, annual return) change with live trading and re-validation — check the latest on the EA pages. See the latest EA results →

XAUUSD EA Settings Guide — Optimal Parameters for Gold Trading

One of the most common questions from new EA traders: "What settings should I use?" The wrong answer is to copy someone else's parameters blindly. The right answer is to understand what each parameter does so you can adapt it to your account size, risk tolerance, and broker.

This guide covers the essential parameters for any XAUUSD Expert Advisor and the reasoning behind recommended defaults.


0. Before Any Setting: Check Your Broker's Gold Symbol and Specs

"XAUUSD" is not the same instrument at every broker. Before touching any parameter, confirm what your broker actually offers.

The symbol name differs by broker:

BrokerGold symbol
XMTradingGOLD
ExnessXAUUSDm (micro-type accounts) / XAUUSD (standard-type accounts)
HFMXAUUSD

Attach the EA to the chart of the symbol your broker actually uses. FXEA365 EAs read the chart symbol (_Symbol) and the broker's tick value dynamically, so there is no need to type the symbol name into a parameter. For reference, the backtests published for our current gold EAs (GOLD VIPER, GOLD KING) were run on Exness XAUUSDm, and as of October 1, 2026, 11 of the 12 accounts on our forward test page are Exness accounts. Results on another broker's symbol will not match exactly.

Contract size and minimum lot are not universal either:

  • On standard accounts, 1 lot of gold is commonly 100 oz, but on cent or micro-type accounts the contract can be about 1/100 of that. The same "0.01 lot" can therefore mean a very different position size.
  • The minimum lot is often 0.01, but the minimum, the lot step and the number of price digits differ by broker and account type.
  • How an EA behaves when the calculated lot is below the minimum (skip the trade or round up to the minimum) differs from EA to EA — check the EA's page.

How to check: In MT5, right-click the symbol in Market Watch → Specification, and note the contract size, minimum volume, volume step and digits. These numbers decide how RiskPercent and MaxSpread actually work on your account.


1. RiskPercent — The Most Important Setting

What it does: Controls what percentage of your account balance is risked on each trade.

Most professional EA traders use 0.5–1.0% per trade. Here's why:

At 1% risk per trade, a 10-trade losing streak (which happens even with good EAs) costs you approximately 10% of your account. At 2%, the same losing streak costs ~20%. At 5%, it's nearly 50%.

The math of recovery also matters: losing 20% requires a 25% gain to recover. Losing 50% requires a 100% gain.

Recommended settings by account size:

Account SizeStarting RiskPercentNotes
$500–$2,0000.5%Small account needs conservative risk
$2,000–$10,0001.0%Standard recommendation
$10,000+0.5–1.0%Experienced traders may use 1.5–2.0%

For XAUUSD specifically, start at 0.5% if you're new to gold EAs. Gold can move far more than a typical currency pair on an active day, so even 1% risk can feel sharp during high volatility.


2. MaxSpread — Protecting Against Broker Tricks

What it does: If the current spread exceeds this value, the EA skips the entry signal.

Use points, not pips. For gold, what counts as one "pip" differs between brokers and articles, so spread settings stated in pips are easy to misread. MT5 shows spread in points (the smallest price step of the symbol, which depends on its digits), and FXEA365 EAs also specify spread limits in points.

Spread depends on the broker, account type and time of day. As one reference, our XMTrading vs Exness comparison (data as of May 2026) cites typical gold spreads of about 15–20 points on XM KIWAMI, about 13–18 points on an Exness Pro account (XAUUSDm), and about 5–8 points plus commission on Exness Raw Spread. Spreads widen around news releases, at the daily rollover and in thin markets, so treat these as examples and measure your own.

Why it matters: an EA that enters with a 70-point spread toward a 200-point target has given up 35% of the potential profit before the trade begins.

How FXEA365 EAs handle it (example: GOLD KING):

ParameterDefaultMeaning
MaxSpreadPoints100Hard ceiling in points
SpreadATRRatio0.25Entry is also allowed while spread ≤ ATR (in points) × 0.25

Parameter names and defaults differ by EA, so check the parameter table on each EA's page. In general, keep the limit above your account's normal spread (otherwise the EA rarely trades) but low enough to skip the wide spikes around news.

Set MaxSpread conservatively. It's better to miss a few entries than to enter during wide-spread conditions.

How to find your actual live spread: In MT5, right-click Market Watch and enable the Spread column (shown in points), then watch it during the hours you plan to trade. Note the spread during normal conditions and during news events.


3. Stop Loss Configuration — Fixed vs ATR-Based

Most quality gold EAs use one of two stop-loss approaches:

Fixed Pip Stop

Simple and predictable. Example: SL = 50 pips, TP = 75 pips (R:R = 1:1.5).

Pro: Easy to understand, consistent behavior. Con: Doesn't adapt to market volatility — a 50-pip stop is too tight during a volatile NFP week and too wide during quiet Asian sessions.

ATR-Based Stop

Stop loss = N × ATR (Average True Range). Example: SL = 1.5 × ATR(14).

Pro: Adapts automatically to current volatility. When gold is calm, the stop is tighter. When volatile, wider. Con: Lot size calculation is more complex; beginners may miscalculate.

Recommendation: For XAUUSD, ATR-based stops generally perform better in backtests because gold volatility is highly variable. A common starting point is SL = 1.5 × ATR(14) and TP = 2.0 × ATR(14).


4. MagicNumber — Avoid Conflicts Between EAs

What it does: A unique number that identifies your EA's trades. The EA only manages positions with its own Magic Number.

If you run two EAs with the same Magic Number, they will interfere with each other — each will try to manage the other's trades, leading to unpredictable closes, double entries, or missed exits.

Rule: Every EA must have a unique Magic Number. If you run two EAs side by side (for example GOLD VIPER and DONCHIAN ENGINE), make sure they have different numbers.

Default Magic Numbers in fxea365.com EAs are pre-set to unique values. Don't change them unless you have a specific reason.


5. UseCompounding — Compound vs Fixed Balance

What it does:

  • true (default): Lot size scales with your account balance as it grows or shrinks
  • false: Lot size always calculated on a fixed balance value

Compounding example: Start with $10,000, 1% risk. After growing to $15,000, the EA automatically trades with larger lots. This is the "compound interest" effect — your returns compound.

Fixed balance example: Always calculate lots as if balance is $10,000, regardless of actual balance. More predictable; you know exactly how much is risked each trade.

Recommendation: UseCompounding = true for long-term growth. UseCompounding = false for more predictable short-term testing.


6. Time Filter Settings

As covered in our XAUUSD trading hours guide, the best hours for gold EA trading are 07:00–17:00 UTC (London open to end of London-NY overlap).

UseTimeFilter    = true
TradeStartHour   = 7
TradeEndHour     = 17
AvoidFridayClose = true   (stop new entries after 20:00 UTC Friday)

Note: Broker server time ≠ UTC, and whether an EA's hour parameters mean UTC or server time differs by EA (GOLD KING, for example, uses UTC for TradeStartHour = 6 / TradeEndHour = 20 but server time for its Friday close hour). Check each parameter's description.

To find your broker's offset, compare the server time shown at the top of Market Watch with the current UTC time. XM's server time is GMT+2 in winter and GMT+3 in summer. Exness uses a different server time from XM (our Exness setup guide treats it as GMT+0), so do not reuse XM-based hour settings on an Exness account — verify in your own terminal. FXEA365 EAs that convert news times have a parameter for this, such as GOLD KING's EconFilter_ServerGMTOffset (default 3 = XM summer time; 2 in winter).


7. Economic Filter Settings

For XAUUSD, major US news events (NFP, CPI, FOMC) can move the price sharply within minutes, and spreads often widen at the same moment. An EA can easily open a losing trade seconds before a surprise announcement.

UseEconomicFilter     = true
NewsAvoidMinutesBefore = 30
NewsAvoidMinutesAfter  = 30
NewsImpactLevel       = 2   (filter medium and high impact news)
NewsTargetCurrencies  = "USD"

This pauses new trade entries 30 minutes before and after any medium or high impact USD news event.


For a new live account running a gold EA (parameter names vary by EA — check each EA's page):

ParameterRecommended ValueNotes
RiskPercent0.5%Start conservative
MaxSpreadAbove your normal spread (in points)Measure on your own account; see the EA's default
UseCompoundingtrueFor long-term growth
UseTimeFiltertrue07:00–17:00 UTC
UseEconomicFiltertrueSkip major news
MagicNumber(default)Don't change unless running multiple EAs

After 2–4 weeks of live observation at 0.5% risk, you can increase to 1.0% if results match expectations.


Compare our current gold EAs (GOLD VIPER, GOLD KING, GOLD NEURON and others — all free with live-account registration; GOLD VIPER, for example, shows PF 1.64 with a max DD of 30.3% (relative) on Exness XAUUSDm M30) on the EA rankings and apply these settings from day one. For a low-DD non-gold option, see DONCHIAN ENGINE (USDJPY). All parameters are accessible directly from the EA's settings dialog in MT5.

📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators

Right after you sign up, you get a download link for a subscriber-only pack of our 13 MT5 indicators: compiled files (.ex5), source code and a setup guide. Then 8 emails on algo-trading essentials, reading backtests correctly and choosing a broker (one a day for the first 5 days, then 7, 14 and 30 days after signing up). You also get notified before each price rise of the versions sold on the MQL5 Market (launch pricing that steps up as copies sell). Our EAs are free on this site with a live account at a partner broker.

* Privacy strictly protected. You can unsubscribe at any time.

Have a question about EAs or FX?

You can post it on the Nattzy trading forum (free sign-up). Questions beyond this article are welcome too — EA settings, choosing a broker and more.

Ask on Nattzy ↗

Comments & questions