All articles
Guide6 min readAugust 3, 2026

How to Automate XAUUSD Trading on MetaTrader 5 (Step-by-Step)

Automating XAUUSD (gold) on MetaTrader 5 is simpler than most people think. If you can install an app and drag a file, you can run a gold Expert Advisor (EA). Here is the full process, plus the safety steps that keep beginners out of trouble.

What you need

  • MetaTrader 5 (free) from metatrader5.com/download
  • A broker account that offers XAUUSD with reasonable spreads
  • A gold EA file (.ex5) — start with a free trial before paying
  • Optional but recommended: a VPS for 24/5 uptime

Step 1 — Install the EA

Open MT5, go to File → Open Data Folder → MQL5 → Experts, and copy the .ex5 file there. Back in MT5, right-click Navigator → Refresh. The EA now appears under Expert Advisors.

Step 2 — Attach it to a gold chart

Open a XAUUSD chart on the M1 timeframe. Drag the EA onto the chart. In the dialog, tick 'Allow Algo Trading'. A smiley or robot icon appears in the top-right of the chart when it is active.

Step 3 — Enable Algo Trading globally

Make sure the 'Algo Trading' button in the MT5 toolbar is green. If it is not, the EA will sit idle and not place trades. This is the #1 reason people think their bot 'is not working'.

A good gold EA sizes lots from your balance automatically — you should not have to calculate lot sizes by hand. If it forces you to guess, that is a red flag.

Step 4 — Test on demo first

Never put real money on a bot you have not watched. Run it on a demo account for at least a few days. Confirm it takes sane lot sizes, respects a daily loss limit, and does not trade wildly through news. Only then consider going live.

Step 5 — Go live (carefully)

  • Start small — the strategy behaves the same on $200 as on $2,000, just smaller amounts
  • Use a VPS so the bot keeps running when your computer is off
  • Check it once a day, not every five minutes — over-watching leads to panic decisions

Try BullionMinds free for 3 days — no card required. Run it on a demo account and judge it on real data.

Start the free 3-day trial

Common setup mistakes

  • Algo Trading button not green (bot idle)
  • Wrong symbol — some brokers name gold GOLD or XAUUSD.m; use the exact one your broker lists
  • Computer sleeps and the bot stops — use a VPS
  • Funding real money before testing on demo

Ready to go live? Pick a plan and pay by card or crypto (USDT).

View plans