BZ Trading Bots logoBZ Trading Bots العربية
XAUUSD EA for MT5: Setup and Settings Explained
BZ Trading Bots

XAUUSD EA for MT5: Setup and Settings Explained

By the BZ Trading Bots team · 24 November 2026 · 5 min read

Installing an XAUUSD Expert Advisor (EA) on MT5 takes a few minutes. Setting it up correctly takes a little more care, because a wrong setting can turn a careful bot into a risky one. This guide explains the settings you will meet in most gold EAs, what each one does, and the checks to run before you let the EA trade real money.

Before You Start

You need three things:

  • An MT5 account with XAUUSD, on a demo account first if you are testing.
  • The EA file (an .ex5 file) from the seller.
  • A computer or VPS that stays on, because the EA only works while MT5 is running.

If you have never installed an EA, follow our step-by-step guide on how to install an Expert Advisor on MT5 first, then come back here for the settings.

Attach the EA to the Right Chart

Open an XAUUSD chart and drag the EA onto it. Two things often go wrong here:

  1. The symbol name. Many brokers add a suffix, such as XAUUSD.m, XAUUSD.s or GOLD. The EA must run on the symbol your broker actually uses for gold. If it is on the wrong chart, it will not trade.
  2. The timeframe. Some EAs need a specific chart timeframe. Use the one the seller tells you, even if the EA reads other timeframes itself.

Then turn on Algo Trading in the MT5 toolbar and tick Allow Algo Trading in the EA's settings window. A small hat or robot icon in the chart corner shows the EA is active.

The Settings That Matter Most

Every EA has its own list, but most gold EAs have these:

SettingWhat it controlsWhat to check
Risk per trade (%)How much of the balance one trade can loseUse the level the EA was tested at
Fixed lotA set lot size instead of a percentageMust suit your balance
Stop lossWhere a losing trade closesShould be on every trade
Take profitWhere a winning trade closesFixed or trailing
Max spreadThe widest spread the EA will trade atNot too tight for your broker
News filterPauses trading around major newsOn, unless told otherwise
Trading hoursWhen the EA may open tradesMatches your broker's server time
Magic numberIdentifies the EA's own tradesUnique if you run several EAs

Risk Per Trade: The Most Important Setting

Risk per trade decides how much one losing trade costs. At 1% risk on a $1,000 account, a losing trade costs about $10. At 5%, it costs about $50, and a run of losses can quickly cut the account by a third.

Start at the risk level the EA's backtests and live accounts used. If the results were made at 1%, running at 3% does not just triple the profit, it also triples the drawdown. Our post on what drawdown is explains why this matters.

Lot Size and Account Type

On a dollar account, 0.01 lot of gold is 1 ounce. On a cent account, the same 0.01 lot is worth 100 times less in dollar terms, so you can trade real money at a much smaller size. If your balance is small, a cent account gives the EA room to work. Our XAUUSD lot size guide and gold lot size calculator help you check the numbers.

Spread and News Settings

Gold spreads widen at the daily open, around big news and on thin holiday days. A max spread setting stops the EA from entering when the spread is too wide. Set it too tight and the EA may never trade on your broker; set it too wide and it may enter at a bad price.

A news filter pauses new trades around major US data. Leave it on unless the EA's documentation says otherwise. See how the news filter protects your account.

Five Checks Before Going Live

  1. Run it on a demo account first for at least a week.
  2. Check that every trade has a stop loss in the Trade tab.
  3. Compare the lot sizes with what you expected for your balance and risk.
  4. Check the Journal and Experts tabs for errors, such as "invalid volume" or "trade disabled".
  5. Move to a VPS so the EA keeps running 24/5. See how to set up a VPS for MT5.

Set Files: Saving Your Settings

A set file (.set) stores all the EA's settings in one file, so you can load them again in one click. Some sellers give you set files for different risk levels. Keep a copy of the set file you use, and note the date you changed anything. Our post on choosing your set file explains how we handle this for BZ Cent Machine.

How We Handle Setup

With BZ Dollar Machine and BZ Cent Machine, you do not have to guess any of this. We install the bot with you on a live call, set the risk you agree to, and check that the first trades open correctly. To compare gold EAs before choosing one, read how to choose the best gold trading bot.

Frequently Asked Questions

Why is my XAUUSD EA not trading?
The most common reasons are Algo Trading turned off, the EA on the wrong symbol name, a max spread setting that is too tight, or the market being closed.

What risk should I use?
Start with the risk level the EA was tested at. For our bots, that is 1% per trade.

Can I run two EAs on the same account?
Yes, if each one has a different magic number and your balance can carry the combined risk.

Do I need a VPS?
It is not required, but it keeps the EA running when your computer is off, and it usually gives faster execution.

BZ Trading Bots
BZ Trading Bots
We build and test gold (XAUUSD) trading bots for MetaTrader 5. Every figure in our articles comes from our own MT5 Strategy Tester reports, shown in full on our Results page.

Risk warning: trading gold (XAUUSD) on margin is high risk and you can lose some or all of your deposit. Backtest results are not live results, and past performance does not guarantee future results. This article is general information, not investment advice.

More from the Blog