How to install EA on MT5
This guide explains how to install EA on MT5. Copy the .ex5 file, or compile a .mq5 source, into the MQL5\Experts folder. Then find the EA in the Navigator, drag it onto a chart and allow automated trading. An installed EA is not a proven one, so test it on a demo account first.
Trading forex and CFDs involves substantial risk of loss. Automation applies rules; it does not remove trading risk. Read our risk disclosure.
Key takeaways
- Open the terminal’s data folder from File → Open Data Folder, then copy the EA into MQL5\Experts.
- A .mq5 source file must be compiled with F7 in MetaEditor before it appears in the Navigator.
- Only one EA runs on a chart. Dropping a second EA onto the same chart removes the first.
- Trading needs the Algo Trading button (AutoTrading in some versions), the platform option and the EA’s own Allow Algo Trading setting.
- Installing an EA does not show that it works. Use the Strategy Tester and a demo account before relying on it.
How to install EA on MT5, step by step
These steps apply to the MT5 desktop terminal on Windows. Menu names and dialog labels can differ slightly between builds, so check the help pages in the sources if something does not match.
- Open the data folder with File → Open Data Folder.
- Go to MQL5 → Experts and copy your .ex5 file into it. Subfolders are allowed, and the Navigator shows their structure.
- If you have a .mq5 source instead, copy it there and compile it. The section below shows how.
- Return to the terminal. If the EA does not appear in the Navigator, restart the terminal.
- In the Navigator, drag the EA onto a chart, or double-click it. The Expert Advisor properties window opens.
- On the Common tab, tick Allow Algo Trading (Allow Auto Trading in some versions and in the MT5 help). On the Inputs tab, set the parameters. Click OK.
- Switch on the Algo Trading button on the toolbar (AutoTrading in some versions).
- Check the EA’s name and icon in the upper right corner of the chart, then the Experts tab in the Toolbox.
Only one EA runs on a chart. If you start a second EA on the same chart, the first one is removed. Run different EAs on different charts instead.
Icon and menu wording can vary by build. The MetaTrader 5 help on Expert Advisors and Custom Indicators is the reference.
Three ways to install an EA in MT5
How you install an Expert Advisor depends on whether you received a compiled .ex5 file, editable .mq5 source code or an MQL5 Market licence. Each path uses a slightly different folder, update workflow and activation model.
| Install path | Folder path | Compilation needed | Update path | Licence / activation note |
|---|---|---|---|---|
| .ex5 compiled file | MQL5\Experts (or a subfolder) | No; loads after Navigator refresh or restart | Replace the .ex5 file manually, then refresh Navigator | Use only compiled files you wrote, bought or licensed |
| .mq5 source file via MetaEditor | MQL5\Experts (compiled .ex5 saved alongside) | Yes; open in MetaEditor (F4) and compile with F7 | Edit source in MetaEditor and recompile with F7 | Requires source code you own or hold permission to modify |
| MQL5 Market direct install | MQL5\Experts\Market (managed by MT5) | No; downloaded and activated by the terminal | Install updates from the terminal’s Market tab | Tied to your MQL5 account; activation limits show on the Common tab |
Where EA files go in the MT5 data folder
The terminal keeps each type of program in its own folder under MQL5. A file in the wrong folder is the most common reason it never shows up in the Navigator.
| Program type | Folder | File types |
|---|---|---|
| Expert Advisor | Experts | .ex5 to run, .mq5 source to compile |
| Custom indicator | Indicators | .ex5 to run, .mq5 source to compile |
| Script | Scripts | .ex5 to run, .mq5 source to compile |
Source files (.mq5) are not listed in the Navigator. Only compiled .ex5 files appear there, so compiling is part of installing. The help pages give the same folders as /MQL5/Experts, /MQL5/Indicators and /MQL5/Scripts.
Compiling a .mq5 source file
A .mq5 file is source code. MetaEditor compiles it into an .ex5 file, which is the only form the terminal runs. Compilation results appear in the MetaEditor log, so read them after every change.
- Copy the .mq5 file into MQL5\Experts.
- Press F4 in the terminal to open MetaEditor.
- In MetaEditor’s Navigator, double-click the file to open it.
- Press F7 to compile. Fix the errors listed in the log, then compile again.
After you edit an EA, compile it again. The help page warns that the terminal keeps using the previous compiled version until you recompile, so a change you saved but did not compile has no effect.
Turning on automated trading
Automated trading has several switches. The platform-wide setting must allow trading, and the EA’s own setting must allow it too. Either one can block orders.
| Switch | Where | Effect |
|---|---|---|
| Algo Trading button (AutoTrading in some versions) | Toolbar | Turns automated trading on or off for the whole platform. When off, no EA can trade. |
| Allow Algo Trading (platform) | Options, Expert Advisors tab | Platform-wide permission. Other options on the same tab cover account and profile switches. |
| Allow Algo Trading (EA) | Common tab in the EA’s properties | Permission for this one EA. You can also change it from the Navigator context menu. |
Turning automated trading off does not remove EAs from charts. It only stops them from trading. The option “Disable automated trading when switching accounts” is worth knowing about, because it stops trading after an account change, such as moving from demo to real.
MQL5 Market purchases and licensed EAs
Products bought from the MQL5 Market are installed by the terminal. After the purchase is confirmed, the terminal downloads and activates the product, saves it to the matching folder and adds it to the Navigator. A licensed product shows its licence details on the Common tab, such as expiry or demo status.
Use only EAs and indicators you wrote, bought or licensed. Do not install copies of paid products from unofficial sources, however they are labelled, because those files can contain harmful code. Whether you may use an EA on a given account is a separate question; see Is EA allowed in trading?.
DLL imports need a separate decision. An EA that imports a DLL needs Allow DLL imports on its Dependencies tab or in the platform settings. The help page calls DLL use potentially dangerous and says to enable it only for applications you trust.
Troubleshooting an EA that will not install or trade
| Symptom | Likely cause | What to check |
|---|---|---|
| EA is not in the Navigator | File is in the wrong folder, or only a .mq5 was copied | The path is MQL5\Experts. Compile the .mq5 with F7, then restart the terminal. |
| EA is on the chart but places no orders | Algo Trading is off, or Allow Algo Trading is not ticked | The toolbar button, the platform option and the Common tab setting. |
| Compile errors | Code errors in the source | The MetaEditor log. Fix the first error listed, then compile again. |
| DLL-related failure | DLL imports are blocked | The Dependencies tab and the Allow DLL imports setting. Enable it only for trusted files. |
| Orders rejected or no trades on the symbol | Wrong symbol name, or the account type does not fit the EA | That the symbol is visible in Market Watch, and that the account and its order mode suit the EA. |
| Error messages while running | Runtime errors raised by the EA code | The Experts tab in the Toolbox. |
If an EA loads but behaves differently from your tests, check the inputs first. A changed input, symbol or timeframe is a different test, and results from one setup do not carry over to another. Before attaching a third-party EA on demo, check its documented symbol, timeframe and input specs — for example, reviewing a source-based breakdown such as the Quantum Titan MT5 setup and risk guide before matching inputs to your broker’s XAUUSD feed.
Where YO4X fits
YO4X is a Windows desktop workspace for supported MetaTrader 5 strategies, bot configuration and trading journals. It does not execute EX5 files or arbitrary uploaded code, so the steps above describe running an EA in your own MT5 terminal, not inside YO4X.
The current desktop workflow is gated to supported MT5 demo accounts, and live-money trading is not released. The staged release allows one active strategy per MT5 account, and local operation needs the PC awake, YO4X open and the connection active. Download YO4X for Windows if you want to use the workspace.
Install and test on demo first. A backtest in the Strategy Tester and a forward run on demo show how a strategy behaved under those conditions. They are not proof of live results. How to verify a trading bot explains what each kind of evidence can and cannot show, and a trading journal keeps the record.
Frequently asked questions
Where do I put an EA in MT5?
Open File → Open Data Folder in the terminal, then go to MQL5 → Experts and copy the .ex5 file there. A .mq5 source goes in the same folder but must be compiled before it appears in the Navigator. Expert Advisors do not belong in the Indicators or Scripts folders.
Why does my EA not show in the Navigator?
The usual causes are a file in the wrong folder, a .mq5 that was never compiled, or a terminal that has not picked up the new file. Check the folder, press F7 in MetaEditor, and restart the terminal.
Can I install an EA bought from the MQL5 Market?
Yes. The terminal installs Market purchases: it downloads and activates the product and adds it to the Navigator. You then run it on a chart like any other EA, and the licence details appear on the Common tab.
Why is my EA on the chart but not trading?
Automated trading is controlled in three places: the Algo Trading toolbar button (AutoTrading in some versions), the platform’s Expert Advisors options, and the EA’s own Allow Algo Trading box on the Common tab. Also check whether your broker uses a symbol suffix (such as XAUUSD.s or EURUSDm) that must match the EA’s inputs, verify the account allows automated execution under EA trading rules, and read the Experts tab for errors on demo first.
Why are my Expert Advisor orders rejected after attaching it to an MT5 chart?
Even when Algo Trading and Allow Algo Trading are enabled, an EA can skip or reject trades if the symbol is hidden in Market Watch, the broker’s symbol suffix or contract specification does not match the EA’s settings, the account mode (hedging vs netting) conflicts with the strategy, or the account restricts bots under broker or prop-firm EA trading rules. Check the Experts and Journal tabs in the Toolbox for the exact return code.
Do I need to enable DLL imports or WebRequest for every MT5 EA?
No. Leave Allow DLL imports and Allow WebRequest for listed URL disabled unless the EA’s documentation specifically requires them and you trust the publisher. Standard MQL5 Expert Advisors that read terminal quotes and submit orders do not need DLL imports. If a trusted EA uses an external calendar or API endpoint, add only the exact required URL to the WebRequest allowlist.
Can YO4X run an EX5 file I upload?
No. YO4X does not execute EX5 files or arbitrary uploaded code. It is a Windows desktop workspace for supported MetaTrader 5 strategies, and its current workflow is gated to supported MT5 demo accounts.
Keep reading
- Expert advisor tester: Strategy Tester walkthrough
- Run multiple MT5 expert advisors on one Windows PC
- Is EA allowed in trading?
- Expert advisor coding basics
- How to verify a trading bot
- What is an Expert Advisor?
Sources: Expert Advisors and Custom Indicators - Algorithmic Trading, Trading Robots - MetaTrader 5 Help · How to Create an Expert Advisor or an Indicator - Algorithmic Trading, Trading Robots - MetaTrader 5 Help · Where to Find Trading Robots and Indicators - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
Trading forex and CFDs involves substantial risk of loss. Past performance and backtests do not guarantee future results. Read our risk disclosure before you trade.