XM Expert Advisors (EA) 2026 — How to Install, Run & Optimize EAs on XM MT4/MT5
XM fully supports automated trading via Expert Advisors on MT4 and MT5. This guide covers installation, enabling AutoTrading, backtesting, free EA sources, and fixing the most common EA problems.
Open XM Account — Run Your EA ↗01 — Does XM Allow EAsDoes XM Allow Expert Advisors? — Quick Answer
✅ Yes — XM fully supports EAs on MT4 and MT5
XM allows automated trading via Expert Advisors on all account types: Standard, Micro, Ultra Low, and Zero. There are no restrictions on EA types — scalping EAs, grid EAs, hedging EAs, and martingale EAs are all permitted. XM also offers a free VPS service for eligible accounts ($500 balance or 5 lots/month) so your EA can run 24/5 without depending on your local machine.
| Feature | MT4 | MT5 |
|---|---|---|
| EA support | ✅ Full | ✅ Full |
| EA file extension | .ex4 / .mq4 | .ex5 / .mq5 |
| MQL5 Market access | ✅ Yes | ✅ Yes |
| Strategy Tester (backtest) | ✅ Yes | ✅ Multi-currency |
| Cross-platform EA compatibility | No — MT4 EAs don't work on MT5 | No — MT5 EAs don't work on MT4 |
| Free VPS from XM | ✅ Yes | ✅ Yes |
02 — Install EA on MT4How to Install an EA on XM MT4 — Step by Step
Open MT4 Data Folder
In XM MT4, go to File → Open Data Folder. A Windows Explorer window opens showing your MT4 data directory.
Navigate to MQL4 → Experts
Inside the data folder, open the MQL4 folder, then open the Experts subfolder. This is where all EA files must be placed.
Paste your EA file
Copy your .ex4 or .mq4 EA file into the Experts folder. If you have a .mq4 source file, MT4 will compile it automatically on restart.
.set file (settings preset), keep it somewhere accessible — you'll need to load it in the EA properties after attaching to chart.Restart MT4 or refresh Navigator
Close and reopen MT4, OR in the Navigator panel (Ctrl+N): right-click on Expert Advisors → Refresh. Your EA will appear in the list.
Drag EA onto your chart
Double-click your EA in Navigator, or drag and drop it onto the chart you want it to trade. A settings popup appears.
Configure settings and enable live trading
In the popup: Common tab → check "Allow live trading" and "Allow DLL imports" (if your EA requires it). In Inputs tab → configure your EA's parameters (lot size, stop loss, etc.). Click OK.
Enable AutoTrading in the toolbar
Click the AutoTrading button in MT4's top toolbar. It must turn green for EAs to execute trades. A smiley face icon should appear in the top-right corner of the chart — this confirms the EA is active and running.
03 — Install EA on MT5How to Install an EA on XM MT5 — Step by Step
Open MT5 Data Folder
In XM MT5, go to File → Open Data Folder. Navigate to MQL5 → Experts folder.
Paste your .ex5 file
Copy your .ex5 or .mq5 EA file into the Experts folder. MT5 EAs use different file extensions from MT4 — they are not interchangeable.
Refresh Navigator and attach to chart
Right-click Expert Advisors in Navigator → Refresh. Find your EA and drag onto chart.
Enable Algo Trading
In the popup: Common tab → check "Allow Algo Trading". Click OK. Then click the Algo Trading button in toolbar (turns green). Check for smiley face icon on chart.
04 — Free EAsWhere to Find Free Expert Advisors for XM
XM does not provide proprietary EAs, but there are excellent free sources:
- MQL5 Market (built-in) — accessible directly from MT4/MT5 Navigator. Thousands of free and paid EAs with reviews, screenshots, and verified performance data.
- MQL5.com Free Section — community-submitted free EAs. Quality varies — always check the code source and reviews.
- Strategy Tester — MT4/MT5 has a built-in backtester. Go to Tools → Strategy Tester to test any EA on historical data before running live.
- MQL5 Community — codebase section at mql5.com/en/code has hundreds of open-source EAs.
⚠️ Always backtest before running live
Never run an EA on a live account without first backtesting it on Strategy Tester with at least 1 year of historical data. Then run it on XM Demo account for at least 2-4 weeks. Only after consistent demo results should you risk real capital. This applies to both free and paid EAs.
05 — VPS for EARunning Your EA 24/5 — XM Free VPS
EAs only run while MT4/MT5 is open on your computer. If your PC turns off or loses internet, the EA stops. Solution: run your EA on a VPS (Virtual Private Server) that stays online 24/5.
✅ XM Free VPS — Eligibility & Setup
- Eligibility: $500 minimum balance OR 5 standard lots traded per month
- What you get: Windows VPS with MT4/MT5 pre-installed, low-latency connection to XM servers
- How to apply: Members Area → VPS → Request Free VPS
- Alternative: If not eligible for free VPS, paid VPS services (ForexVPS, BeeksFX) start from $10-30/month
06 — TroubleshootingEA Not Trading on XM — Common Problems & Fixes
❌ AutoTrading button is grey or off
Click the AutoTrading (MT4) or Algo Trading (MT5) button in the toolbar until it turns green. If it keeps reverting to off, check Tools → Options → Expert Advisors → make sure "Allow automated trading" is checked.
❌ Frown face on chart instead of smiley
Right-click the EA on chart → Properties → Common tab → check "Allow live trading" and "Allow DLL imports". Also check the Experts tab in Terminal for specific error messages.
⚠️ EA opens trades on demo but not live
Most common cause: "Allow live trading" is checked but the account type is still in demo mode. Verify you are logged into your real account. Also check if the EA has hardcoded account number protection (some commercial EAs only work on registered accounts).
⚠️ EA showing "trade context is busy"
This happens when another EA or script is currently executing. If persistent, it may indicate a bug in the EA code. Try restarting MT4/MT5 and reattaching the EA.
07 — FAQFrequently Asked Questions — XM Expert Advisors
Open XM Account — Start Running Your EA
All account types support EAs · Free VPS available · $5 minimum deposit · MT4 & MT5
Open XM Account ↗Related: XM MT4/MT5 Download · XM Free VPS · MT4 Login Issues · XM Account Types