How to install an .ex4 / .ex5 file in MetaTrader
Copy the file into the terminal's data folder — MQL4/Experts for an .ex4 in MetaTrader 4, MQL5/Experts for an .ex5 in MetaTrader 5 (Indicators go in the Indicators folder) — refresh the Navigator, drag it onto a chart and switch on Algo/AutoTrading. That is the whole install. The details below cover both terminals and the mistakes that trip most people.
Before you start: which file do you have?
.ex4 is a compiled MetaTrader 4 program. .ex5 is a compiled MetaTrader 5 program. They are not interchangeable — an .ex4 will never appear inside MT5, and vice-versa. If you're unsure which terminal you're running, look at the window title ("MetaTrader 4" / "MetaTrader 5") or read .ex4 vs .ex5 — which one do you need?. Files from this site are listed with an MT4 or MT5 tag so you can filter before downloading.
Install on MetaTrader 4 (.ex4)
- In MT4 click File → Open Data Folder. A Windows Explorer window opens at the terminal's data directory.
- Open MQL4. Inside it: Experts is for expert advisors (trading robots), Indicators for indicators, Scripts for one-shot scripts. Most files here are EAs.
- Copy the
.ex4file into the right folder. - Back in MT4, right-click the Navigator panel (Ctrl+N if hidden) → Refresh. The new name appears under Expert Advisors or Indicators.
- Drag it onto the chart you want it to trade. In the dialog, tick Allow live trading (Common tab). Tick Allow DLL imports only if the EA specifically requires it — most don't.
- Press the AutoTrading button in the toolbar so it turns green. A smiling face in the top-right corner of the chart means the EA is active; a sad face means AutoTrading is off or live trading isn't allowed for that EA.
Install on MetaTrader 5 (.ex5)
- File → Open Data Folder → open MQL5 → Experts (or Indicators).
- Copy the
.ex5file there. - Right-click Navigator → Refresh.
- Drag the EA onto a chart. In the dialog tick Allow Algo Trading and review the Inputs tab (lot size, risk, magic number).
- Click the Algo Trading toolbar button so it turns green. A small hat icon top-right on the chart turns blue when the EA is running; a grey/red hat means algo trading is disabled.
Where each file type goes
| File | What it is | MT4 folder | MT5 folder |
|---|---|---|---|
| .ex4 / .ex5 (EA) | Compiled expert advisor | MQL4/Experts | MQL5/Experts |
| .ex4 / .ex5 (indicator) | Compiled indicator | MQL4/Indicators | MQL5/Indicators |
| .mq4 / .mq5 | Source code — needs compiling in MetaEditor (F7) | same folders | same folders |
| .set | Input preset — load from the EA dialog → Inputs → Load | MQL4/Presets | MQL5/Presets |
| .tpl | Chart template | templates | Profiles/Templates |
Not sure whether a file is an EA or an indicator? Put it in Experts first; if it doesn't show up after a refresh, move it to Indicators.
Common mistakes
- Wrong terminal. An .ex4 copied into MQL5 (or an .ex5 into MQL4) simply won't appear.
- Forgot to refresh. The Navigator only rescans the folder on Refresh or restart.
- AutoTrading off. The EA attaches fine but never trades — check the toolbar button and the per-EA "Allow live/algo trading" tick.
- Mobile app. The MT4/MT5 phone apps cannot run custom EAs or indicators. You need the Windows terminal (or a Windows VPS; Mac users run MT via Wine/Parallels or use a VPS).
- Symbol or timeframe mismatch. Some EAs are written for one pair or timeframe (often visible in the name, e.g. "XAUUSD M5") — check the post or the inputs.
Still stuck? See EA not working? The usual fixes. Ready to test properly? How to test a free EA on a demo account.
Frequently asked questions
Where do I put an .ex4 file in MT4?
File → Open Data Folder → MQL4 → Experts (for an EA) or Indicators (for an indicator). Then right-click Navigator → Refresh.
Where do I put an .ex5 file in MT5?
File → Open Data Folder → MQL5 → Experts (EA) or Indicators. Refresh the Navigator, drag onto a chart, enable Algo Trading.
Can I run an .ex4 file in MetaTrader 5?
No. .ex4 is compiled for MT4 only and .ex5 for MT5 only. Download the version that matches your terminal — this site tags every file MT4 or MT5.
Can I install an EA on the MT4/MT5 mobile app?
No. The mobile apps do not support custom expert advisors or indicators. Use the Windows desktop terminal or a Windows VPS.