How to Install an EA in MT4 and MT5
Open File → Open Data Folder in MT4 or MT5, copy the EA file into MQL4/Experts (MT4) or MQL5/Experts (MT5), restart or refresh the Navigator, then drag the EA onto a chart. Turn on Algo Trading (MT5) or AutoTrading (MT4) and tick "Allow algorithmic trading" in the EA's settings. MT4 EAs don't run on MT5, and the EA only trades while the terminal is running.
File types
| File | What it is |
|---|---|
| .ex4 / .ex5 | Compiled EA for MT4 / MT5: ready to run |
| .mq4 / .mq5 | Source code: compile in MetaEditor first |
MT4 uses MQL4 and MT5 uses MQL5, according to MetaQuotes. The two are not interchangeable.
Install, step by step
- In the terminal, go to File → Open Data Folder.
- Open MQL4 → Experts (MT4) or MQL5 → Experts (MT5).
- Copy the .ex4/.ex5 file there. If the EA came with indicators or DLLs, put them in Indicators or Libraries as instructed.
- Return to the terminal, right-click Expert Advisors in the Navigator and choose Refresh (or restart).
- Drag the EA onto a chart of the symbol and timeframe it’s designed for.
- In the window that opens:
- Common tab: tick Allow algorithmic trading (MT5) / Allow live trading (MT4). Tick DLL imports only if the EA needs them and you trust the source.
- Inputs tab: set lot size, risk and other parameters.
- Turn on Algo Trading (MT5) or AutoTrading (MT4) in the toolbar.
- Check the chart’s top-right corner: the EA’s icon shows whether it’s active.
Check it’s working
- Experts tab (Toolbox/Terminal): EA messages and errors.
- Journal tab: connection and order logs.
- Common errors: “trade is disabled” (AutoTrading off or wrong account type), “invalid volume” (lot size below the minimum or wrong step), “not enough money” (margin).
Before running it with real money
- Run it in the Strategy Tester (Ctrl+R). MT5’s tester supports multi-currency strategies.
- Run it on a demo for a few weeks.
- Run it at minimum size, ideally on a cent or micro account (cent brokers).
Broker rules and keeping it running
Confirm the broker allows EAs and your EA’s style. Scalping EAs need a broker that permits scalping (scalping rules). For EAs that must run 24/5, a forex VPS keeps the terminal online. Brokers suited to automated trading are on best brokers for EAs.
Best Forex Brokers for EAs and Free VPS 2026
| Broker | Platforms | Visit broker | |||
|---|---|---|---|---|---|
| 4.9/5Editorial rating | ✓ | MT4 / MT5 / XM App | 1.6 pips | Visit | |
| 4.3/5 | ✓ | MT4 / MT5 / Vantage App | 1.4 pips | Visit | |
| 4.2/5 | ✓ | MT4 / MT5 / Exness Terminal / Exness Trade app | 0.8 pips | Visit | |
| 4.1/5 | ✓ | MT4 / MT5 / HFM App | 1.4 pips | Visit | |
| 4.1/5 | ✓ | MT4 / MT5 / XS Trading App | 1.1 pips | Visit | |
| 4.1/5 | ✓ | MT4 / MT5 / FXGT App / FXGT Trader | 1.9 pips | Visit | |
| 3.7/5 | ✓ | MT4 / MT5 / WebTrader | 1.2 pips | Visit | |
| 3.7/5 | ✓ | easyMarkets Web/App / MT4 / MT5 / TradingView | 0.9 pips | Visit | |
| 3.5/5 | ✓ | MT4 / MT5 / Axi app | 0.68 pips minimum | Visit | |
| 3.5/5 | ✓ | MT4 / MT5 / EBC app | 1.1 pips minimum | Visit | |
| 3.4/5 | ✓ | MT4 / MT5 / cTrader | 1.3 pips | Visit | |
| 3.2/5 | ✓ | MT4 / MT5 | 1.9 pips | Visit |
Related
Frequently asked questions
Why is my EA not trading?
Most often the Algo Trading/AutoTrading button is off, 'Allow algorithmic trading' isn't ticked in the EA's Common tab, or the market is closed. Check the Experts and Journal tabs for error messages.
Can I use an MT4 EA in MT5?
No. MT4 uses MQL4 and MT5 uses MQL5. You need an MT5 version of the EA.
Do I need a VPS for an EA?
Only if it must run when your computer is off. The EA works only while the terminal is open and connected.
Do brokers allow EAs?
Most do. Titan FX, for example, says all strategies including EAs are allowed. Check the terms for bans on specific practices such as latency arbitrage.