How to Set Up a XAUUSD EA on MetaTrader 4: Step-by-Step Guide

A practical walkthrough for traders running gold Expert Advisors on MT4 — from file installation to first live trade, including the honest differences from MT5 setup.

Note: Most modern gold EAs — including Goldie Razor V2.8.4 — require MT5. This guide is for EAs specifically built for MT4. If your EA supports both platforms, consider using MT5 for better backtesting accuracy (99% vs 90% modelling quality) and a more modern execution architecture.

Quick Answer

To set up a XAUUSD EA on MT4: download MT4 from your broker (not MetaQuotes), add your gold symbol to Market Watch (check if it's XAUUSD, GOLD, or another variant), place the .ex4 file in MQL4/Experts, restart MT4, attach the EA to a XAUUSD chart, and enable both "Allow live trading" in EA properties and the global Expert Advisors button in the toolbar. Test on demo for at least 48 hours before going live.

The 5-Step MT4 Setup Guide

MT4 EA Setup Checklist

Check each item as you complete it. Score 8/8 before going live.

0/8

Fix issues first — do not go live yet

MT4 for Gold EA Trading: What You Need to Know

Finding the Right Symbol Name

This is the single most common source of confusion when setting up a XAUUSD EA on MT4. Brokers are not required to name their gold instrument "XAUUSD" — it might be GOLD, XAU/USD, XAUUSDm (with a suffix), XAUUSD. (with a period), or something broker-specific like GOLDpro.

In Market Watch, right-click and choose "Show All" — this reveals every symbol your broker offers. Look for anything gold-related. If you see multiple gold symbols (XAUUSD, XAUUSDm, XAUUSD.pro), ask your broker which one is for standard trading accounts and has the best spread conditions. The symbol name differences are usually due to brokers offering different account types on the same platform.

Once you know the correct symbol name, verify your EA handles it correctly. Attach it to a chart of that symbol and watch the Journal tab (View → Terminal → Journal) for any error messages on load. Messages like "unknown symbol" or "wrong symbol" confirm the EA has a hardcoded symbol check that doesn't match your broker's name.

Understanding MT4's Technical Limitations for Gold EAs

MT4 was released in 2005 and its architecture reflects that era. It supports 9 timeframes (M1, M5, M15, M30, H1, H4, D1, W1, MN1) versus MT5's 21 timeframes. It uses a single-threaded execution model, meaning the EA, indicator calculations, and platform operations share processing time. And its backtesting is limited to 90% modelling quality because it simulates ticks from 1-minute bars rather than using stored tick data.

For most gold EA strategies — breakout, trend-following, session-based scalping — these limitations are liveable. The 90% modelling quality is sufficient for validating whether a strategy has edge. The limited timeframes are rarely a problem since most gold EAs run on M1, M5, M15, or H1. The single-threaded execution is more of a concern only for latency-sensitive scalpers.

Where MT4 genuinely falls short: if you want to run multiple EAs simultaneously with complex interactions, or if you need M2/M3/M6 timeframes for precise timing, or if you need the Depth of Market panel (DoM is MT5-only). For most traders running one gold EA on one chart, these aren't blockers.

MT4 vs MT5: The Honest Comparison

The practical question for most traders is: should I set up on MT4 or migrate to MT5? The answer depends on your EA. If your EA is available in both .ex4 and .ex5 format, MT5 is the better long-term choice — better backtesting, more timeframes, and brokers are gradually shifting their focus to MT5 infrastructure investment. If your EA is MT4-only (.ex4, no MT5 version), you stay on MT4 for now.

Goldie Razor V2.8.4 is MT5-only. If you're currently on MT4 and want to run it, you'll need an MT5 account — most brokers that offer MT4 also offer MT5 on the same platform. Opening an MT5 account is typically done through the same broker portal; it doesn't require switching brokers, just opening a second account type.

The one area where MT4 has a practical advantage is familiarity. If you've used MT4 for years, know its quirks, and have a working setup, there's real risk in migrating — you might introduce setup errors that aren't related to the EA itself. Weigh the theoretical advantages of MT5 against the execution risk of a platform migration before switching mid-run.

Journal Tab: Your Diagnostic Tool

The Journal tab (View → Terminal → Journal) is the most important diagnostic tool in MT4. Every EA action, warning, and error gets logged here. When you attach an EA, it should log a startup message. When it opens a trade, it logs order placement. When there's a problem — wrong symbol, permissions not set, connection issue — the error appears here.

Get into the habit of checking Journal after every EA configuration change. If you change a parameter and the EA stops behaving as expected, the Journal will almost always show why. Common useful messages include: "ExpertAdvisors are disabled" (global toggle off), "trade is not allowed" (broker or account-level restriction), "not enough money" (lot size too large for account), and "market is closed" (EA trying to trade outside market hours).

The Journal is cleared each time MT4 restarts. If you need to preserve a log for analysis, right-click the Journal tab and choose "Save As" before restarting.

Demo Testing: Required, Not Optional

Every EA setup — MT4 or MT5 — should run on demo for a minimum of 48 hours before live trading. This isn't about confirming the strategy works; backtesting handles that. Demo testing is about confirming the setup works: that the EA attaches, finds the symbol, opens trades, manages them, and closes them correctly. It catches configuration errors before they cost real money.

Be aware of one important demo-to-live difference: MT4 demo accounts at most brokers use idealized execution conditions. Spreads are typically tighter, slippage lower, and execution faster than live. A scalping EA that performs well on demo may underperform on live due to this gap. For breakout and trend-following strategies, the difference is smaller. For precision scalping, the gap can be meaningful — test on a live micro-lot account as a second step before scaling to full size.

Frequently Asked Questions

Goldie Razor V2.8.4

M15 breakout + H4 EMA filter — built for XAUUSD on MT5

View Goldie Razor →