QUANTA Blog
How to Install an Expert Advisor on MT4 and MT5 (Step-by-Step Guide)
July 18, 2026 · 9 min read
An Expert Advisor, or EA, is a program that runs inside MetaTrader and executes a coded trading strategy on your behalf. Installing one is not difficult, but the process has a few non-obvious steps, and most first-time problems come from skipping one of them. This guide walks through the full installation on both MetaTrader 4 and MetaTrader 5, shows you how to confirm the EA is actually running, and covers the mistakes that trip up newcomers most often.
Before you start
You need three things before anything else. First, the EA file itself. On MetaTrader 4 this is a compiled file with the .ex4 extension; on MetaTrader 5 it is .ex5. Some vendors ship source code as .mq4 or .mq5 instead, which also works — the platform compiles it automatically. The two formats are not interchangeable: an .ex4 file will not run on MT5, and an .ex5 file will not run on MT4, so check which platform your EA was built for before you begin.
Second, a trading account with a broker that offers MetaTrader, and the matching terminal installed on your machine. Brokers distribute their own branded builds of MT4 and MT5; any of them will do, as long as the version matches your EA file.
Third — and this is a recommendation rather than a requirement — a demo account or a cent account for the first run. Even a well-built EA can behave unexpectedly on a new broker because of different symbol names, spreads, or stop levels. Running it in a low-stakes environment first lets you verify that everything works before real capital is involved.
Installing on MetaTrader 4
The whole process comes down to putting the file in the right folder and switching two settings on. Here it is step by step.
- Open MetaTrader 4, then go to
Fileand clickOpen Data Folder. A file manager window opens showing the data directory for this specific terminal installation. - Inside that window, navigate to
MQL4/Expertsand copy your.ex4file into it. This exact folder matters — the terminal only looks for Expert Advisors here. - Go back to MetaTrader. Either restart the terminal, or right-click the
Expert Advisorssection in theNavigatorpanel and chooseRefresh. Your EA should now appear in the list. - Open a chart of the symbol the EA is designed for, set the timeframe the vendor specifies, and drag the EA from the Navigator onto that chart. A settings dialog appears.
- In the dialog, open the
Commontab and tickAllow live trading. Review the inputs on theInputstab if the vendor provided settings, then clickOK. - Finally, make sure the
AutoTradingbutton in the top toolbar is switched on. It should show a green play symbol. This is a global switch — if it is off, no EA in the terminal can trade, regardless of per-chart settings.
Tip
File → Open Data Folder to find the right directory instead of browsing to Program Files manually. On Windows, the actual data folder often lives in a hidden AppData location, and each terminal installation has its own. Copying the file into the wrong installation is one of the most common reasons an EA never shows up in the Navigator.Installing on MetaTrader 5
The flow on MT5 is nearly identical, with two differences: the folder name and the wording of the settings.
- Go to
File→Open Data Folder, exactly as on MT4. - Place your
.ex5file intoMQL5/Experts. Note the folder isMQL5, notMQL4. - Restart the terminal or refresh the
Navigatorpanel so the EA appears in the list. - Drag the EA onto a chart of the correct symbol and timeframe.
- In the settings dialog, on the
Commontab, tickAllow Algo Trading. This is the same permission that MT4 callsAllow live trading— MetaQuotes renamed it in MT5, which confuses people who switch between platforms. - Enable the global
Algo Tradingbutton in the toolbar, the MT5 equivalent of the AutoTrading button on MT4.
One more MT5-specific note: symbols on MT5 brokers sometimes carry suffixes or slightly different names than their MT4 counterparts. If your vendor documentation mentions a specific symbol, match it exactly, including any suffix your broker uses.
How to tell it is running
After installation, the platform gives you several signals that the EA is alive and permitted to trade.
On MT4, look at the top-right corner of the chart. You should see the EA name with a small smiley face next to it. The smiley means the EA is attached and live trading is allowed. A sad face, or in older builds a hat or cross symbol, means the EA is attached but blocked — usually because Allow live trading was not ticked or the global AutoTrading button is off.
On MT5, the chart corner shows the EA name together with the algo trading state. If algo trading is disabled at either the chart level or the terminal level, the platform marks it clearly next to the EA name.
The real source of truth, however, is the log. Open the Toolbox panel (called Terminal on MT4) and check two tabs. The Experts tab shows messages printed by the EA itself — most EAs log an initialization message when they start. The Journal tab shows platform-level events: connection status, order activity, and errors. If something is wrong, the reason is almost always written in one of these two tabs. Reading them should become a habit, because a chart can look perfectly normal while the log is reporting a problem.
Common mistakes
The same handful of issues account for the vast majority of failed installations. Check this list before assuming the EA itself is broken.
- Wrong folder. The file must sit directly in
MQL4/ExpertsorMQL5/Experts. Files placed inIndicators,Scripts, or the root of the data folder will not appear in the Expert Advisors list. - AutoTrading disabled. The per-chart permission and the global toolbar button must both be on. Either one alone is not enough.
- Wrong symbol or timeframe. An EA coded for one instrument and chart period may refuse to trade, or trade incorrectly, when attached elsewhere. Follow the vendor documentation exactly.
- Closing the terminal. An EA only runs while MetaTrader itself is running. Shutting down the terminal, or the computer going to sleep, stops all trading logic until the platform is opened again.
- DLL imports left disabled. Some EAs rely on external libraries and require
Allow DLL importsto be ticked in the settings dialog. If the vendor says this is needed and it is off, the EA will fail to initialize. If the vendor does not mention DLLs, leave the option off — it is a security-sensitive permission. - Running an untested set file. Vendors often distribute
.setfiles with preconfigured inputs. Loading a set file meant for a different symbol, account size, or broker without checking it first is a frequent source of unexpected behavior. Review the inputs before the first trade, ideally on demo.
Warning
Do you need a VPS?
Not strictly. If your computer stays on, awake, and connected during the hours the EA trades, a VPS adds nothing essential. Plenty of people run EAs on a home machine without issues.
The honest case for a VPS is reliability, not performance magic. Because an EA only works while the terminal runs, anything that interrupts your machine — sleep mode, automatic OS updates, a power cut, a flaky home connection — can leave open positions unmanaged or cause missed entries and exits. An always-on virtual server removes that whole class of problems. A modest VPS located near your broker server also keeps order transmission latency low and stable, which matters more for strategies that are sensitive to execution speed and less for slower ones.
The usual answer for someone running an EA around the clock is a small, inexpensive Windows VPS close to the broker data center. If you are still in the demo-testing phase, your own computer is fine — add the VPS when the setup graduates to a live account and needs to run unattended.
First-launch checklist
Before you walk away from the terminal, run through this short recap.
- The EA file is in
MQL4/ExpertsorMQL5/Expertsand visible in the Navigator. - It is attached to the correct symbol and timeframe per the vendor documentation.
Allow live trading(MT4) orAllow Algo Trading(MT5) is ticked in the EA settings.- The global
AutoTrading/Algo Tradingtoolbar button is on, and the chart shows the active state. - The
Expertstab shows a clean initialization message and theJournaltab shows no errors. - The inputs or set file match your account and broker, and the first run is happening on a demo or cent account.
- The machine running the terminal will stay on and connected — or a VPS is handling that job.
Tip
Risk disclaimer
Read next
SIGMA EA — flagship gold strategy →
A XAUUSD algorithm for MetaTrader with Myfxbook monitoring published on its page.