Bonuses

How to Install an EA in MT4 and MT5

Updated 30 October 2026 · Written by Broker Atlas Guides Desk · Data checked by Broker Atlas Data Desk

Short answer

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

  1. In the terminal, go to File → Open Data Folder.
  2. Open MQL4 → Experts (MT4) or MQL5 → Experts (MT5).
  3. Copy the .ex4/.ex5 file there. If the EA came with indicators or DLLs, put them in Indicators or Libraries as instructed.
  4. Return to the terminal, right-click Expert Advisors in the Navigator and choose Refresh (or restart).
  5. Drag the EA onto a chart of the symbol and timeframe it’s designed for.
  6. 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.
  7. Turn on Algo Trading (MT5) or AutoTrading (MT4) in the toolbar.
  8. 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

  1. Run it in the Strategy Tester (Ctrl+R). MT5’s tester supports multi-currency strategies.
  2. Run it on a demo for a few weeks.
  3. 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

BrokerPlatformsVisit broker
XMFeatured4.9/5Editorial rating✓MT4 / MT5 / XM App1.6 pipsVisit
Vantage4.3/5✓MT4 / MT5 / Vantage App1.4 pipsVisit
Exness4.2/5✓MT4 / MT5 / Exness Terminal / Exness Trade app0.8 pipsVisit
HFM4.1/5✓MT4 / MT5 / HFM App1.4 pipsVisit
XS.com4.1/5✓MT4 / MT5 / XS Trading App1.1 pipsVisit
FXGT4.1/5✓MT4 / MT5 / FXGT App / FXGT Trader1.9 pipsVisit
Titan FX3.7/5✓MT4 / MT5 / WebTrader1.2 pipsVisit
easyMarkets3.7/5✓easyMarkets Web/App / MT4 / MT5 / TradingView0.9 pipsVisit
Axi3.5/5✓MT4 / MT5 / Axi app0.68 pips minimumVisit
EBC Financial3.5/5✓MT4 / MT5 / EBC app1.1 pips minimumVisit
AXIORY3.4/5✓MT4 / MT5 / cTrader1.3 pipsVisit
BigBoss3.2/5✓MT4 / MT51.9 pipsVisit

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.