Home›Learn›How-to›How to install an EA in MetaTrader

How to install an EA in MetaTrader

Installing an Expert Advisor in MetaTrader is the process of copying the EA file into the correct folder so that MetaTrader can find and run it. Once in…

How-to3 minUpdated 14 Aug 2026
How to install an EA in MetaTrader

What it is

Installing an Expert Advisor in MetaTrader is the process of copying the EA file into the correct folder so that MetaTrader can find and run it. Once installed, the EA appears in your Navigator panel and can be attached to any chart.

The process is straightforward but has a few steps that trip up new users. This guide covers installation in both MetaTrader 4 and MetaTrader 5.

What you'll need

  • MetaTrader 4 or 5 installed and connected to your broker
  • The EA file — either a compiled .ex4 / .ex5 file, or source code .mq4 / .mq5 that needs compiling
  • A set file if the developer provided one (optional but recommended)

Step-by-step: MetaTrader 4

Step 1 — Find the data folder

In MetaTrader 4, click File → Open Data Folder. A Windows Explorer window opens. This is where MetaTrader stores all its files.

Step 2 — Navigate to the Experts folder

Inside the data folder, open MQL4 → Experts. This is where EA files live.

Step 3 — Copy the EA file

Copy your .ex4 file into the Experts folder. If you have a source code .mq4 file instead, copy that into the same folder — MetaTrader will compile it automatically.

Step 4 — Refresh MetaTrader

Back in MetaTrader, right-click Expert Advisors in the Navigator panel and select Refresh. Your EA should now appear in the list.

Step 5 — Enable automated trading

Click the AutoTrading button in the toolbar (it looks like a play button and should turn green). Without this enabled, EAs will not place trades.

Step 6 — Attach to a chart

Open a chart for the instrument you want to trade. Drag the EA from the Navigator panel onto the chart — or double-click it. A settings window appears.

Step 7 — Load the set file and configure

In the Inputs tab, click Load to load the developer's set file if you have one. Adjust the lot size and any other parameters for your account. Ensure "Allow live trading" is ticked. Click OK.

Step 8 — Confirm the EA is running

A small smiley face icon appears in the top-right corner of the chart. Green smiley = EA is active and ready to trade. Grey smiley = EA is attached but automated trading is disabled.

Step-by-step: MetaTrader 5

The process is identical except:

  • The data folder path is MQL5 → Experts (not MQL4)
  • EA files use the .ex5 extension (compiled) or .mq5 (source)
  • The AutoTrading button works the same way

Common problems and fixes

EA appears in Navigator but won't attach to chart: Check that the EA is compiled — you should have a .ex4 or .ex5 file, not just the source code .mq4/.mq5. Right-click the EA in the Navigator and select Compile if needed.

Smiley face is grey: AutoTrading is disabled. Click the AutoTrading button in the toolbar.

EA is running but not placing trades: Check that "Allow live trading" was ticked in the EA settings. Also check the EA's log in the Experts tab of the terminal for any error messages.

EA disappears after MetaTrader restarts: This usually means the EA wasn't saved to the correct folder, or the chart it was attached to wasn't saved as a template. Re-attach the EA and ensure AutoTrading is on after restart.

Important settings to check

  • Allow live trading: Must be ticked or the EA runs in observation mode only
  • Allow DLL imports: Some EAs require this — only enable it for EAs from trusted sources
  • Magic number: A unique identifier for the EA's trades. If running multiple EAs on the same account, each should have a different magic number to avoid them interfering with each other

The Karnek note

Karnek is read-only monitoring for MetaTrader - it watches every account you run, live on one dashboard, and alerts you the moment something stops. It never trades and never asks for a trading password.

See it in Karnek: see how Karnek works, set up read-only monitoring in minutes.

More in How-to →

Written and reviewed by the Karnek Research team. Last updated August 2026.

Educational content only - not financial advice. Past performance does not predict future results. Trading carries significant risk.

Karnek

See your results, proven.

Connect an account read-only and watch every metric on this page update live from your terminal. Your first account is free.