trding.io

Trding.io Tutorial

How to Install an Expert Advisor (EA) on MetaTrader 4 (MT4)

By Michael · Head of StrategyPublished 2026-08-02

Installing an Expert Advisor (EA) on MetaTrader 4 means copying its .ex4 or .mq4 file into the platform's MQL4/Experts folder, restarting or refreshing MT4, dragging the EA onto a chart, and enabling AutoTrading with 'Allow live trading' ticked. This guide walks beginners through every step, flags the classic traps — wrong folder, AutoTrading off, blocked DLL imports — and reminds you honestly that no EA guarantees profit: a good backtest is not a promise of live results, and most retail traders lose money.

What is an Expert Advisor, and why this guide?

An Expert Advisor (EA) is an automated trading robot that runs inside MetaTrader 4. It watches the chart, applies the rules its author programmed, and can open, manage, and close trades without you clicking anything. On MT4, EAs are written in MQL4 and come as compiled .ex4 files (ready to run) or .mq4 source files (which MT4 compiles for you).

The steps are simple, but the two things that trip up almost every beginner are putting the file in the wrong folder and forgetting to switch AutoTrading on. This tutorial gives you exact, numbered steps plus a troubleshooting section so your EA shows up in the Navigator and is actually permitted to trade.

Before you start

  • MetaTrader 4 installed and logged into a trading account (use a demo account for first tests).
  • The EA file: a .ex4 file (compiled, most common) or a .mq4 file (source code).
  • Any companion files the EA needs, such as a .set preset or custom indicators, kept together.
  • The location of your download noted, for example your Downloads folder.

Step 1 — Locate your EA file (.ex4 or .mq4)

Find the file you downloaded. A .ex4 file is a compiled, ready-to-run EA — the most common format. A .mq4 file is editable source code that MT4 compiles into an .ex4 the first time it is opened in the platform.

If the EA arrived in a .zip archive, unzip it first. MT4 cannot read files that are still inside a zip.

Step 2 — Open the MT4 data folder

In MetaTrader 4, click the top menu: File > Open Data Folder. A file-explorer window opens at the exact folder MT4 reads from. Always use this menu item — do not browse manually to the Program Files install directory, because MT4 keeps your EAs in a separate user data folder.

Step 3 — Copy the EA into MQL4\Experts

In the window that opened, double-click the MQL4 folder, then open the Experts subfolder. Copy your .ex4 or .mq4 file here. You may create subfolders inside Experts to keep things tidy — MT4 will still list the EA.

If the EA ships with custom indicators, place those .ex4/.mq4 indicator files in MQL4\Indicators. Library files go in MQL4\Libraries, and any .set preset files can be kept in MQL4\Presets.

Step 4 — Restart or refresh MetaTrader 4

Return to MT4. Either close and reopen the platform, or right-click the 'Expert Advisors' branch in the Navigator panel (View > Navigator, or Ctrl+N) and choose Refresh. Your EA should now appear under Expert Advisors.

Step 5 — Attach the EA to a chart

Open a chart for the instrument and timeframe the EA expects (File > New Chart). In the Navigator, find your EA under Expert Advisors, then double-click it or drag it onto the chart.

A settings window opens. On the 'Common' tab, tick 'Allow live trading'. On the 'Inputs' tab, set the parameters or load a .set preset if the vendor provided one, then click OK.

Step 6 — Enable AutoTrading

Find the 'AutoTrading' button in the top toolbar and click it so it turns green — this is the master switch that permits any EA to place live orders. When AutoTrading is on and the EA is attached correctly, a smiling face appears in the top-right corner of the chart. A frowning (sad) face means AutoTrading is off or the EA is not allowed to trade.

Step 7 — Confirm the EA is running

  • Smiling face in the top-right corner of the chart = EA is active and allowed to trade.
  • The 'AutoTrading' toolbar button is green.
  • Open the Terminal (Ctrl+T) and check the 'Experts' tab for initialisation messages, and the 'Journal' tab for platform-level events.

Common traps to avoid

  • EA does not appear in the Navigator: it is in the wrong folder. It MUST be inside MQL4\Experts, reached via File > Open Data Folder — not the Program Files directory. Refresh the Navigator after copying.
  • Sad/frowning face on the chart: AutoTrading is off, or 'Allow live trading' was not ticked in the EA's Common tab. Click the green AutoTrading button and re-check the settings.
  • EA needs DLL imports: some EAs call external DLLs. Tick 'Allow DLL imports' in the EA's Common tab (and under Tools > Options > Expert Advisors). Only enable this for EAs from a source you trust — DLLs can run arbitrary code on your machine.
  • Wrong symbol or timeframe: many MT4 EAs are built for one specific pair and timeframe; running them elsewhere may produce no trades or odd behaviour.
  • AutoTrading blocked: check the Journal tab — some brokers or account types restrict automated trading.

Troubleshooting

  • Nothing happens after attaching the EA: open Terminal > Experts and Terminal > Journal to read the error messages — they usually pinpoint the cause.
  • 'AutoTrading is disabled' warning: click the AutoTrading toolbar button until it is green, then re-attach the EA.
  • EA compiles with errors (for .mq4): open it in MetaEditor (right-click the EA > Modify) and press F7; missing include or indicator files are the common reason.
  • EA shows but never trades: confirm the market is open, that spread, lot size, and balance meet the EA's requirements, and that inputs are set correctly.
  • Still stuck: remove the EA (right-click chart > Expert Advisors > Delete), restart MT4 fully, then repeat Steps 5–6. Always test on a demo account first.

An honest word on risk

Getting the installation right is purely technical — it tells you nothing about whether the EA will make money. No Expert Advisor guarantees a profit. A strategy that shines in a backtest can still lose live, because backtests rely on historical data and idealised conditions (clean fills, no nasty slippage, tidy spreads) that real markets do not respect.

Most retail traders lose money, and automation does not rewrite that reality — it just executes the rules faster, in both directions. Test on a demo account, make sure you understand exactly what the EA does, risk only money you can afford to lose, and be sceptical of anyone promising guaranteed or 'risk-free' returns. None of this is financial advice.

This tutorial is educational and is not financial advice. CFDs are complex instruments and come with a high risk of losing money. Most retail traders lose money.

Find my broker in 60s →