An Expert Advisor (EA) is a program that runs inside MetaTrader 5 and can open and close trades according to predefined rules. This guide walks you through installing an EA in MT5 and checking that it is running.
Before you start
- An EA for MT5 is a
.ex5(compiled) or.mq5(source code) file..ex4/.mq4files are for MT4 and do not work in MT5. - An EA only runs while the terminal is open and connected to the internet. Systems that must run 24/7 therefore usually run on a VPS.
- If you logged in with the investor (read-only) password, trades cannot be opened. You must log in with the master password.
Step 1: Open the data folder
In MT5, click File → Open Data Folder. In the window that opens, go into the MQL5 folder.
Step 2: Copy the file to the right folder
- Copy the EA file into
MQL5\Experts. - Indicator files go into
MQL5\Indicators. - If you only have a
.mq5source file, open it in MetaEditor and compile it with F7; this creates the.ex5file.
If you have more than one MT5 installed, each has its own data folder. Make sure you copy the file into the folder of the terminal that will run the EA.
Step 3: Refresh the list
Press Ctrl+N to open the Navigator panel. Right-click Expert Advisors and choose Refresh. If the EA still does not appear, close MT5 and open it again.
Step 4: Enable algo trading
- Go to Tools → Options → Expert Advisors and make sure the option that allows algorithmic trading is ticked.
- The Algo Trading button on the top toolbar must be green. If it is red, click it to switch it on.
- If the EA needs to connect to an external address (WebRequest), add only the address given in the EA's documentation, and only if you trust it, to the allowed list on the same tab. Do not add unnecessary addresses.
Step 5: Attach the EA to a chart
- Drag the EA from the Navigator onto the chart (or double-click it).
- On the Common tab, make sure the option allowing algo trading is ticked.
- On the Inputs tab, review the EA's parameters. Do not use the default values on a live account until you understand them.
- Click OK.
Step 6: Check that it is running
- The EA's name and an icon should appear in the top-right corner of the chart.
- In Toolbox → Experts (Ctrl+T) there should be an entry showing that the EA loaded successfully. If there is an error, it is shown here.
Common problems
| Symptom | Likely cause and fix |
|---|---|
| The EA is not in the Navigator | Wrong folder, the list was not refreshed, or the file is for MT4. Check steps 2 and 3. |
| No EA icon on the chart, or it is crossed out | Algo Trading is off. Turn the toolbar button green. |
| "trade is disabled" or similar error in the Experts tab | You may have logged in with the investor password, or EA trading may not be permitted on the account or by the broker. |
| "Not enough money" / "Invalid volume" | The lot size does not fit the balance or the symbol's minimum/maximum volume. Correct the lot in the Inputs. |
| The EA never opens trades | The market may be closed (weekend), the EA's conditions may not have occurred, or you are using an account type (hedging / netting) the EA does not support. |
| The EA stops when the computer shuts down | The EA runs inside the terminal, so the terminal must stay open. For continuous operation a VPS is used. |
For Thatri.ch tools
Thatri.ch MT5 indicator and EA files are installed the same way. For license and tool details see the FAQ, and for walkthroughs see the videos page.
Frequently asked questions
Can I run an EA on the MT5 mobile app?
No. The MT5 mobile app does not run Expert Advisors. EAs run on the desktop MT5 terminal, or on a terminal hosted on a VPS.
Will an EA written for MT4 work in MT5?
No. MT4 files (.ex4 / .mq4) are not compatible with MT5. You need a separate compiled .ex5 file built for MT5.
How do I change an EA's settings later?
Right-click the chart, open Expert Advisors and choose Properties (shortcut: F7). Change the parameters on the Inputs tab and click OK.