You have an .ex5 file. You paid for it, a friend sent it, or you downloaded it from somewhere. Now you want to install it on MT5 and watch it trade. Should take five minutes, right?
It should — but almost everyone gets stuck the first time. The problem is that MT5 has two separate directories: the installation folder (where the program lives) and the data folder (where it looks for EAs). If you drop your EA into the wrong one, MT5 will never find it. No error message, no warning. It just... doesn't show up.
This guide walks through the entire process, from locating the right folder to verifying that the EA is actually running.
Quick reference: file types
Before starting, check what you actually have.
| File type | What it is | Where it goes |
|---|---|---|
.ex5 | Compiled EA — ready to run | MQL5\Experts\ |
.mq5 | Source code — needs compiling first | MQL5\Experts\ |
.mqh | Header file (code dependency) | MQL5\Include\ |
.dll | External library (some EAs need these) | MQL5\Libraries\ |
.set | Parameter preset | MQL5\Presets\ |
If you downloaded a zip file, extract it first and see what's inside. Most of the time it's just one .ex5 file, which makes everything simple.
Step 1: Find the MT5 data folder
This is where everyone goes wrong.
The MT5 data folder is NOT the installation directory. It's buried somewhere in your Windows user profile — a path like C:\Users\YourName\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8...\. The random string is a unique identifier based on your MT5 installation path. Every computer is different.
Don't try to find it manually. Just do this:
- Open MT5
- Click File in the top menu
- Click Open Data Folder
An Explorer window pops up. You're now in the right place.
Inside this folder, open the MQL5 subfolder. This is where everything goes:
MQL5/
├── Experts/ ← EA files go here
├── Indicators/ ← Custom indicators
├── Scripts/ ← Scripts
├── Include/ ← .mqh header files
├── Libraries/ ← .dll files
├── Files/ ← Runtime sandbox (EA reads/writes here)
└── Presets/ ← .set parameter files
If you have multiple MT5 terminals (different brokers, for example), each one has its own separate data folder. Always click "Open Data Folder" from inside the specific MT5 terminal where you want the EA installed.
Step 2: Copy the file
Most common case — you have an .ex5 file:
Copy it into MQL5\Experts\. Done.
You can create subfolders for organization — Experts\Trend\, Experts\Grid\, whatever makes sense to you. MT5 scans all subdirectories recursively.
If the EA came with a .dll file:
Put the DLL in MQL5\Libraries\, not next to the EA. This is a high-frequency mistake — we see it in support emails constantly. The EA logs "Cannot load DLL" and the trader assumes the EA is broken when the file is just in the wrong folder.
If you got .mqh files:
These go in MQL5\Include\. They're only needed for compilation. If you already have the .ex5, you can usually ignore them.
If there's a .set file:
Put it in MQL5\Presets\. You'll be able to load these parameters with one click when configuring the EA later.
Step 3: Refresh the Navigator
Back in MT5, press Ctrl+N to open the Navigator panel (if it's not already visible).
Find Expert Advisors in the navigator tree, right-click it, and hit Refresh.
Your EA should now appear in the list. If it doesn't:
- Confirm the file is actually in
MQL5\Experts\(click File → Open Data Folder again to double-check) - Make sure it's an
.ex5file, not.mq5(source code needs compiling first) - Try closing and reopening MT5
Step 4: Attach the EA to a chart
Find your EA in the Navigator and either double-click it or drag it onto a chart window. A settings dialog appears.
Common tab:
Two checkboxes matter here:
- Allow Algo Trading — must be checked, otherwise the EA runs but won't place any orders
- Allow DLL imports — only check this if the EA requires a DLL file. DLLs have full system access, so only enable this for EAs you trust
Inputs tab:
This shows all the EA's adjustable parameters — lot size, stop loss, take profit, filters, etc. If you're not sure what to set, run with the defaults first. Most EA developers tune the defaults to a reasonable starting point.
At the bottom: Load imports a .set preset file, Save exports your current settings. Useful for switching between configurations.
Click OK.
Step 5: Turn on auto-trading (three switches)
MT5 has a three-layer permission system. All three must be on, or the EA sits there doing nothing.
Switch 1: Toolbar button. Look for the Algo Trading button on the MT5 toolbar. Click it so the icon turns green. Green means auto-trading is globally allowed. Red or gray means it's blocked for everything, regardless of individual EA settings.
Switch 2: Platform settings. Go to Tools → Options → Expert Advisors tab. Make sure Allow Algo Trading is checked. There are also three safety switches that disable auto-trading when you switch accounts, charts, or profiles. Leave those on — they occasionally cause confusion ("why did my EA stop?") but they protect you from accidentally running strategies on the wrong account.
Switch 3: The individual EA's permission. This is the "Allow Algo Trading" checkbox on the Common tab from Step 4. If you forgot to check it, right-click the chart → Expert Advisors → Properties to reopen the dialog.
All three layers must be enabled. We've had users email us saying an EA is "broken" when the toolbar button was just set to red.
How to verify it's running
Look at the top-right corner of the chart:
- EA name with a smiley face — running normally with trading permission
- EA name with a gray icon — running but auto-trading is blocked somewhere (check the three switches)
- Nothing — EA isn't attached. Drag it onto the chart again
Open the bottom panel with Ctrl+T and switch to the Experts tab. This shows the EA's log output — initialization messages, trade activity, errors. If something is wrong, the error message usually tells you exactly what.
If you have .mq5 source code
Some EAs are distributed as source code. You need to compile it into .ex5 before MT5 can run it.
- Press F4 in MT5 to open MetaEditor
- Open your
.mq5file (Ctrl+O, or find it in the file tree if it's already inMQL5\Experts\) - Press F7 to compile
Check the bottom panel:
- 0 errors — compilation succeeded. The
.ex5file was automatically generated in the same directory. Go back to MT5, refresh the Navigator, and proceed from Step 4. - Errors — double-click an error to jump to the problem line. The most common issue is a missing
.mqhheader file. Put it inMQL5\Include\and try again. - Warnings only — compilation succeeded. Warnings don't prevent the EA from running.
Troubleshooting
EA is installed but not trading
Check the three permission switches in order. 90% of the time, one of them is off.
If all three are green and the EA still isn't trading, open the Experts log tab. The EA might be waiting for specific market conditions — a particular session, a minimum spread, a trend filter. Read the EA's documentation to understand what triggers it enters on.
"Cannot load DLL" error
The .dll file is in the wrong folder. Move it to MQL5\Libraries\, not MQL5\Experts\. Also confirm that "Allow DLL imports" is checked in the EA properties.
Can I run multiple EAs on one chart?
No. MT5 allows one EA per chart window. To run multiple EAs simultaneously, open a separate chart for each one. If you're running the same EA with different settings (different pairs, different lot sizes), set a unique Magic Number in each instance's parameters so the orders don't interfere with each other.
Do I need to keep MT5 open 24/7?
Yes — the EA runs inside the MT5 process. Close MT5 and the EA stops. This is why most serious EA traders use a VPS (virtual private server) to keep MT5 running around the clock without tying up their personal computer. Monthly cost is typically $5–20.
Can I use an MT4 EA on MT5?
No. MT4 uses .ex4 files written in MQL4. MT5 uses .ex5 files written in MQL5. The languages are similar but not compatible. You need a version specifically built for whichever platform you're using. All EAs in the FXTool marketplace clearly label which platform they support.
What to do after installation
Once the EA is running, don't go straight to a live account.
Demo first. Run the EA on a demo account for at least a few weeks with the default parameters. Watch what it does — when it enters, when it exits, how it handles losses. The goal isn't to see if it makes money on demo (it probably will, since demo execution is cleaner). The goal is to understand its behavior.
Backtest it. Before trusting any EA with real money, run your own backtest. Don't rely on the developer's screenshots. Load it into the Strategy Tester (Ctrl+R), set a 3–5 year date range, use "Every tick based on real ticks" mode, and read the backtest report yourself.
Learn what the parameters do. Our EA parameter guide covers the most common settings — lot size, stop loss, magic number, time filters — and how to adjust them for your account size and risk tolerance.
About the author: The FXTool team builds and tests MetaTrader trading tools daily. We run every EA we sell on live accounts and publish the results. This guide reflects what we've learned from building 50+ EAs and working with thousands of retail traders.
Forex trading involves significant risk and may result in total loss of capital. This article is for educational purposes only and is not investment advice.