How to install an Expert Advisor on MetaTrader 5
Updated5 min read
MetaTrader 5Install
- An Expert Advisor is one compiled
.ex5file that belongs in theMQL5/Expertsfolder of your terminal’s own data folder.- Presets are
.setfiles and belong inMQL5/Presets; restart MetaTrader 5 after copying either.- A XauStack build runs offline. There is no URL to allow, no key to type and no account to register.
Installing an Expert Advisor on MetaTrader 5 is four moves: get the file, put it in the right folder, restart the terminal, attach it. Nothing about it is clever, and almost every failed install is one of two mistakes — the file was put in the program folder instead of the data folder, or the terminal was never restarted. This guide is the same sequence the download wizard on the home page shows, written out so you can read ahead of it.
1. Download the package
A XauStack download is a zip. Inside it are the Expert Advisor itself — a
single compiled .ex5 file — the .set preset files that carry the settings a
strategy was tested with, and an installer script.
The free Backtest edition and a licensed build are packaged identically. What differs is where each will run, which the last section covers.
2. Open the data folder, not the program folder
MetaTrader 5 keeps your terminal’s own files somewhere other than where the application was installed. MetaQuotes documents the location plainly: “All Expert Advisors are stored in the /MQL5/Experts folder of the trading platform”, and you reach it from the terminal itself with File → Open data folder (MetaTrader 5 Help).
That command opens a window on the folder MetaTrader 5 is actually reading. It
is the only reliable way to find it — the path contains a generated identifier
per installation, so no two machines have the same one, and copying a file into
C:\Program Files\MetaTrader 5 does nothing at all.
Inside that window you want two folders:
MQL5/Experts— the.ex5goes here.MQL5/Presets— every.setfile goes here.
Unzip the download and copy them across. On Windows the included install.ps1
does exactly this and nothing else; running it by hand and dragging the files
yourself produce the same result.
3. Restart MetaTrader 5
MetaTrader 5 reads the Experts folder when it starts. A file copied in while
the terminal is running will not appear in the Navigator panel until you close
and reopen it. If your Expert Advisor is not in the list after a restart, it is
in the wrong folder — go back to step 2 and use File → Open data folder
rather than a path you typed.
You should now see the Expert Advisor by name in Navigator → Expert Advisors.
4. Attach it, and turn algorithmic trading on
Drag the Expert Advisor from the Navigator onto an XAUUSD chart, or
double-click it. A settings dialog opens; load the .set preset that shipped
beside it from the Inputs tab, so you are running the configuration the
strategy was tested with rather than whatever the defaults happen to be.
Then enable algorithmic trading from the toolbar. This is a separate switch from attaching the Expert Advisor, and it is the one people forget: MetaQuotes notes that disabling Expert Advisors in the platform settings “only prohibits Expert Advisors from trading” rather than unloading them (MetaTrader 5 Help). An Expert Advisor can be attached, initialised and quietly forbidden from placing a single order.
What the Backtest edition will and will not do
The free download is a Backtest edition. It initialises inside the Strategy Tester and refuses to start on a chart — on a demo account and on a live one alike. That is deliberate: it is the whole of the free build’s restriction, and it means the free file can never place a real-time order for anyone.
So if you have downloaded the free edition, step 4 above is not your step 4. Yours is to open the Strategy Tester, pick XAUUSD, load the preset and run it — which is the subject of how to backtest a gold EA in MT5.
What a licensed build does differently
A licensed XauStack build is compiled for the MetaTrader 5 account numbers you give at checkout. It attaches to a chart, it trades, and it refuses to initialise on any account it was not built for.
It also runs entirely offline. There is no licence server to reach, so there is no URL to add under Tools → Options → Expert Advisors → Allow WebRequest for listed URL, no key to paste and nothing to register. If a guide elsewhere tells you to whitelist a vendor’s domain, that instruction is not ours — see what an account-locked build is for why the design ended up that way.
When you replace a build with a newer version
Every new version is rebuilt for the accounts your licence already covers, and
it arrives as a fresh zip. Install it exactly as above, overwriting the old
.ex5.
One step comes first, and it matters: a new build carries its own magic number, so it does not recognise positions the previous build opened. Close those positions, or take them over by hand, before you attach the new file. Otherwise you have two sets of rules and one account, and only one of them knows the trades are there.
Before you act on any of this
Nothing here is advice about whether to trade, or with what. Every figure XauStack publishes comes from the MetaTrader 5 Strategy Tester and is labelled where it appears, and no result is promised anywhere on this site. Read the risk disclosure before you attach any Expert Advisor to an account that holds money.
Read next
How to backtest a gold EA in MT5 properly
Real ticks versus modelled ticks, what History Quality tells you, how spread and commission are handled, and the two ways a run flatters a strategy.
What an account-locked build is
Why a XauStack Expert Advisor is compiled for your MT5 login instead of unlocked by a key, what offline means, and what happens if your account changes.