To install an EA in MT5, click File → Open Data Folder, open MQL5 → Experts, and paste the .ex5 file there. Back in MT5, right-click Expert Advisors in the Navigator and choose Refresh, then drag the EA onto the right chart, tick Allow Algo Trading, and make sure the Algo Trading button in the toolbar is green.
What do you need before installing an EA?
- MetaTrader 5 installed and logged in to your trading account (demo first is wise).
- The EA file.
.ex5is the compiled file MT5 runs;.mq5is source code that MT5 compiles for you. - The EA's guide: which symbol, which timeframe, which settings, and any license key.
How do you install an EA in MT5, step by step?
- Open the data folder. In MT5 click File → Open Data Folder.
- Copy the file. Open MQL5 → Experts and paste the
.ex5(or.mq5) file there. If the EA came with a.dll, it goes in MQL5 → Libraries. - Refresh. Back in MT5, open the Navigator (Ctrl+N), right-click Expert Advisors and choose Refresh. The EA appears in the list. Restarting MT5 works too.
- Allow algo trading globally. Open Tools → Options → Expert Advisors and tick Allow algorithmic trading. Tick Allow DLL imports only if the EA's guide asks for it (licensed EAs often do).
- Attach it to the right chart. Open the chart the guide names, for example XAUUSD on M15, and drag the EA from the Navigator onto it. On the Common tab tick Allow Algo Trading; on the Inputs tab enter your settings and license key.
- Switch it on. Click OK and make sure the Algo Trading button in the top toolbar is green. The EA's icon in the chart's top-right corner turns blue when it is active.
If the EA uses a license key, the activation details are in how to activate an EA license key in MT5.
How do you know the EA is working?
- The Toolbox → Experts tab shows a line saying the EA was loaded successfully.
- The Journal tab shows no errors about the EA.
- No trade yet is normal. Most EAs wait for their conditions or their session. Check the guide for when it trades.
Why is my EA not working in MT5, and how do I fix it?
| Problem | Likely cause | Fix |
|---|---|---|
| EA icon is grey in the Navigator | The file is not compiled or was built for a newer MT5 | Update MT5 (Help → Check for updates). For a .mq5, double-click it in MetaEditor and press Compile. |
| EA does not appear at all | Wrong folder, or a different MT5 installation's folder | Use File → Open Data Folder from the same MT5 you are running, then Refresh. |
| "Algo trading is disabled" or a grey icon on the chart | The toolbar button or the EA's own setting is off | Turn on the Algo Trading button and tick Allow Algo Trading in the EA's Common tab. |
| Loaded but never trades on a gold account | The symbol name differs, e.g. XAUUSD.m or GOLD | Attach it to your broker's gold symbol, and check the guide for a symbol input. |
| "Trade is disabled" | Logged in with the investor (read-only) password, or the market is closed | Log in with the master password; wait for market hours. |
| Stops working overnight | The PC slept, restarted or lost internet | Run MT5 on a VPS so it stays online 24/5. |
Should you install the EA on a VPS?
For live trading, yes. An EA only trades while MT5 runs. On a Windows VPS you install MT5, log in, and repeat exactly the steps above. Choose a VPS location close to your broker's trade server for lower latency, and keep the EA running on only one machine at a time so it does not trade twice.
What should you do after installing the EA?
- Run it on a demo account for two to four weeks.
- Backtest it on real ticks: how to backtest an EA in MT5.
- Go live with the stated minimum capital, never more than you can afford to lose.
Questions, illuminated
Where do I put an EA file in MT5?
In MT5 click File, then Open Data Folder, and paste the .ex5 file into MQL5, then Experts. Then refresh Expert Advisors in the Navigator.
Why is my EA greyed out in MT5?
A grey icon usually means the file is not compiled or was built for a newer version of MT5. Update MT5, or compile the .mq5 source in MetaEditor.
Why is my EA not taking trades?
Check that the Algo Trading button is green, that Allow Algo Trading is ticked in the EA's Common tab, that it is on the correct symbol and timeframe, and that its trading conditions or session have actually occurred.
Can I use an MT4 EA in MT5?
No. MT4 EAs (.ex4) do not run in MT5. You need the MT5 version of the EA (.ex5).
Do I need a VPS to run an EA?
For live trading it is strongly recommended, because the EA only trades while MetaTrader is running and connected.
The bottom line
Installing an EA in MT5 takes a minute: copy the .ex5 into MQL5 → Experts, refresh, allow algo trading, attach it to the right chart and check the button is green. Then test on demo, backtest on real ticks, and run it on a VPS when you go live.