Before you start
- You need MetaTrader 5 on Windows (a PC or a Windows VPS). Phones cannot run Expert Advisors, and MT4 uses a different file type.
- The EA file ends in .ex5. A file ending in .mq5 is source code, and an .ex4 file is for MetaTrader 4.
- Keep MT5 logged in to the account you want to trade, and test on a demo account first.
The steps
- In MetaTrader 5 choose File > Open Data Folder. A Windows folder opens.
- Open MQL5, then Experts, and paste the .ex5 file there.
- Back in MetaTrader, open the Navigator panel (Ctrl+N), right-click Expert Advisors and choose Refresh. The EA appears in the list. Restarting MetaTrader does the same.
- Open a chart of the symbol the EA is made for (for example XAUUSD) and set the timeframe the EA asks for.
- Drag the EA from the Navigator onto the chart. A settings window opens.
- On the Common tab tick Allow Algo Trading. On the Inputs tab check the settings the seller recommends, then press OK.
- Make sure the Algo Trading button in the top toolbar is green. Without it, no EA trades.
How to tell that it is working
- A smiley face in the top-right corner of the chart means the EA is attached and allowed to trade. A sad face means trading is off.
- Open the Experts tab at the bottom of the terminal. It shows what the EA says when it starts and any errors.
- If the EA needs a license key, the Experts tab tells you when the key was accepted or refused.
Frequently asked questions
Where is the Experts folder in MT5?
In MetaTrader 5 choose File > Open Data Folder, then open MQL5 and Experts. Files placed there appear in the Navigator after a refresh.
Why does my EA show a sad face?
The Algo Trading button in the toolbar is off, or Allow Algo Trading is not ticked in the EA settings. Switch both on.
Can I install an EA on my phone?
No. MetaTrader mobile apps cannot run Expert Advisors. You need MetaTrader 5 on Windows, on your own computer or a Windows VPS.
Does the EA keep trading if I close MetaTrader?
No. The EA runs inside MetaTrader 5, so it stops when the program closes or the computer shuts down. A VPS keeps it running.
Sources and method
- General market conventions and MetaTrader 5 behaviour. Brokers differ in server time, contract size and trading hours, so always check your own broker's contract specification. Examples use made-up round numbers.