QQUANTA
Buy

QUANTA Blog

How to Install an Expert Advisor on MT4 and MT5 (Step-by-Step Guide)

July 18, 2026 · 9 min read

An Expert Advisor, or EA, is a program that runs inside MetaTrader and executes a coded trading strategy on your behalf. Installing one is not difficult, but the process has a few non-obvious steps, and most first-time problems come from skipping one of them. This guide walks through the full installation on both MetaTrader 4 and MetaTrader 5, shows you how to confirm the EA is actually running, and covers the mistakes that trip up newcomers most often.

Before you start

You need three things before anything else. First, the EA file itself. On MetaTrader 4 this is a compiled file with the .ex4 extension; on MetaTrader 5 it is .ex5. Some vendors ship source code as .mq4 or .mq5 instead, which also works — the platform compiles it automatically. The two formats are not interchangeable: an .ex4 file will not run on MT5, and an .ex5 file will not run on MT4, so check which platform your EA was built for before you begin.

Second, a trading account with a broker that offers MetaTrader, and the matching terminal installed on your machine. Brokers distribute their own branded builds of MT4 and MT5; any of them will do, as long as the version matches your EA file.

Third — and this is a recommendation rather than a requirement — a demo account or a cent account for the first run. Even a well-built EA can behave unexpectedly on a new broker because of different symbol names, spreads, or stop levels. Running it in a low-stakes environment first lets you verify that everything works before real capital is involved.

Installing on MetaTrader 4

The whole process comes down to putting the file in the right folder and switching two settings on. Here it is step by step.

  1. Open MetaTrader 4, then go to File and click Open Data Folder. A file manager window opens showing the data directory for this specific terminal installation.
  2. Inside that window, navigate to MQL4/Experts and copy your .ex4 file into it. This exact folder matters — the terminal only looks for Expert Advisors here.
  3. Go back to MetaTrader. Either restart the terminal, or right-click the Expert Advisors section in the Navigator panel and choose Refresh. Your EA should now appear in the list.
  4. Open a chart of the symbol the EA is designed for, set the timeframe the vendor specifies, and drag the EA from the Navigator onto that chart. A settings dialog appears.
  5. In the dialog, open the Common tab and tick Allow live trading. Review the inputs on the Inputs tab if the vendor provided settings, then click OK.
  6. Finally, make sure the AutoTrading button in the top toolbar is switched on. It should show a green play symbol. This is a global switch — if it is off, no EA in the terminal can trade, regardless of per-chart settings.

Tip

Always use FileOpen Data Folder to find the right directory instead of browsing to Program Files manually. On Windows, the actual data folder often lives in a hidden AppData location, and each terminal installation has its own. Copying the file into the wrong installation is one of the most common reasons an EA never shows up in the Navigator.

Installing on MetaTrader 5

The flow on MT5 is nearly identical, with two differences: the folder name and the wording of the settings.

  1. Go to FileOpen Data Folder, exactly as on MT4.
  2. Place your .ex5 file into MQL5/Experts. Note the folder is MQL5, not MQL4.
  3. Restart the terminal or refresh the Navigator panel so the EA appears in the list.
  4. Drag the EA onto a chart of the correct symbol and timeframe.
  5. In the settings dialog, on the Common tab, tick Allow Algo Trading. This is the same permission that MT4 calls Allow live trading — MetaQuotes renamed it in MT5, which confuses people who switch between platforms.
  6. Enable the global Algo Trading button in the toolbar, the MT5 equivalent of the AutoTrading button on MT4.

One more MT5-specific note: symbols on MT5 brokers sometimes carry suffixes or slightly different names than their MT4 counterparts. If your vendor documentation mentions a specific symbol, match it exactly, including any suffix your broker uses.

How to tell it is running

After installation, the platform gives you several signals that the EA is alive and permitted to trade.

On MT4, look at the top-right corner of the chart. You should see the EA name with a small smiley face next to it. The smiley means the EA is attached and live trading is allowed. A sad face, or in older builds a hat or cross symbol, means the EA is attached but blocked — usually because Allow live trading was not ticked or the global AutoTrading button is off.

On MT5, the chart corner shows the EA name together with the algo trading state. If algo trading is disabled at either the chart level or the terminal level, the platform marks it clearly next to the EA name.

The real source of truth, however, is the log. Open the Toolbox panel (called Terminal on MT4) and check two tabs. The Experts tab shows messages printed by the EA itself — most EAs log an initialization message when they start. The Journal tab shows platform-level events: connection status, order activity, and errors. If something is wrong, the reason is almost always written in one of these two tabs. Reading them should become a habit, because a chart can look perfectly normal while the log is reporting a problem.

Common mistakes

The same handful of issues account for the vast majority of failed installations. Check this list before assuming the EA itself is broken.

Warning

MetaTrader runs EAs locally, not on the broker server. If your laptop sleeps, reboots for updates, or loses internet, the EA stops managing its positions until the terminal is back online. Keep this in mind before leaving trades unattended overnight.

Do you need a VPS?

Not strictly. If your computer stays on, awake, and connected during the hours the EA trades, a VPS adds nothing essential. Plenty of people run EAs on a home machine without issues.

The honest case for a VPS is reliability, not performance magic. Because an EA only works while the terminal runs, anything that interrupts your machine — sleep mode, automatic OS updates, a power cut, a flaky home connection — can leave open positions unmanaged or cause missed entries and exits. An always-on virtual server removes that whole class of problems. A modest VPS located near your broker server also keeps order transmission latency low and stable, which matters more for strategies that are sensitive to execution speed and less for slower ones.

The usual answer for someone running an EA around the clock is a small, inexpensive Windows VPS close to the broker data center. If you are still in the demo-testing phase, your own computer is fine — add the VPS when the setup graduates to a live account and needs to run unattended.

First-launch checklist

Before you walk away from the terminal, run through this short recap.

  1. The EA file is in MQL4/Experts or MQL5/Experts and visible in the Navigator.
  2. It is attached to the correct symbol and timeframe per the vendor documentation.
  3. Allow live trading (MT4) or Allow Algo Trading (MT5) is ticked in the EA settings.
  4. The global AutoTrading / Algo Trading toolbar button is on, and the chart shows the active state.
  5. The Experts tab shows a clean initialization message and the Journal tab shows no errors.
  6. The inputs or set file match your account and broker, and the first run is happening on a demo or cent account.
  7. The machine running the terminal will stay on and connected — or a VPS is handling that job.

Tip

Let the EA run on demo through at least a few of its normal trading cycles before moving to a live account. The goal is not to judge the strategy in a week — it is simply to confirm that the installation, the settings, and the broker connection all behave the way the documentation says they should.

Risk disclaimer

Trading involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. This article is for educational purposes only and does not constitute investment advice.

Read next

SIGMA EA — flagship gold strategy

A XAUUSD algorithm for MetaTrader with Myfxbook monitoring published on its page.