Skip to content
  • Licensed software only

Guide

How to install an Expert Advisor on MT4 and MT5

Where the files go, which terminal settings to enable and how to confirm an Expert Advisor is actually running, with the differences between MetaTrader 4 and 5 called out.

6 min readPublished

Installing an Expert Advisor is a five-minute job once you know where the files go and which switches the terminal expects you to flip. Most “it doesn't work” tickets we receive are really installation problems: the file is in the wrong folder, algorithmic trading is off, or the EA was attached to a symbol it does not support. This guide walks through the process on both MetaTrader 4 and MetaTrader 5 and shows you how to confirm the EA is genuinely running before you leave it alone.

Before you start

Check three things on the product page of the tool you bought: the platform (MT4, MT5 or both), the platform build it was last tested on, and the symbols and timeframes it is designed for. MT4 and MT5 files are not interchangeable. An .ex4 file will not load in MT5 and an .ex5 file will not load in MT4. If you are unsure which terminal you have, open Help → About; the window shows the platform name and build number. Our guide MT4 vs MT5 for Expert Advisors explains the differences if you are still choosing.

Download the release from Account → Downloads. The page shows the version, the tested build and a SHA-256 checksum. Verifying the checksum takes one command on Windows — certutil -hashfile filename SHA256 — and confirms the file is byte-for-byte what the author shipped.

Step 1: Open the data folder

MetaTrader keeps user files outside the program directory. In the terminal choose File → Open Data Folder. A Windows Explorer window opens at a path like C:\Users\you\AppData\Roaming\MetaQuotes\Terminal\<long id>. Inside you will find an MQL4 folder (MT4) or an MQL5 folder (MT5). Always use this menu item rather than searching the disk: if you run several terminals, each has its own data folder, and copying to the wrong one is the most common reason an EA never appears in the Navigator.

Step 2: Copy the files to the right subfolders

  • Expert Advisors (.ex4 / .ex5) go into MQL4/Experts or MQL5/Experts.
  • Indicators that the EA depends on go into MQL4/Indicators or MQL5/Indicators. The product's documentation lists any required indicator files.
  • Set files (.set) go into MQL4/Presets or MQL5/Presets, so they appear in the Load dialog of the inputs tab.
  • Libraries (.dll, .ex4 or .ex5 in the libraries folder) go into MQL4/Libraries or MQL5/Libraries. Few of our tools use DLLs; those that do say so on the product page.

If the release is a zip archive, extract it first and copy the extracted files, not the archive. Do not rename compiled files; some tools check their own filename during activation.

Step 3: Restart or refresh

The Navigator panel (View → Navigator, or Ctrl+N) reads the folders at start-up. Either restart the terminal or right-click the Expert Advisors node in the Navigator and choose Refresh. The new EA should appear under Expert Advisors. If it does not, the file is in the wrong data folder or was built for the other platform.

Step 4: Enable algorithmic trading

Two switches control whether any EA may trade. The first is the toolbar button — labelled AutoTrading on MT4 and Algo Trading on MT5. It must be green. The second is in Tools → Options → Expert Advisors: tick Allow algorithmic trading (MT5) or Allow automated trading (MT4). Leave Disable automated trading when the account has been changed and …when the profile has been changed unticked if you switch accounts often, otherwise the terminal will silently stop EAs after each switch.

If the product page says the tool needs DLL imports, also tick Allow DLL imports. Otherwise leave it off; it is a security setting and most tools do not need it.

Step 5: Attach the EA to a chart

Open a chart of the symbol and timeframe the documentation specifies. Drag the EA from the Navigator onto the chart, or right-click it and choose Attach to a chart. A dialog with several tabs appears:

  • Common: tick Allow Algo Trading (MT5) or Allow live trading (MT4). Without this, the EA loads but never places orders.
  • Inputs: the tool's parameters. If the author supplied a set file, click Load and pick it from the Presets folder. Otherwise start with the defaults; the product page explains which inputs you may need to change for your broker or account size.
  • Dependencies (MT5 only, when present): tick Allow DLL imports only if required.

Click OK. On MT5 a small icon appears in the top-right corner of the chart with the EA name; on MT4 the name appears with a smiley face. A grey or sad face means algorithmic trading is not fully enabled — go back to step 4 and the Common tab.

Step 6: Confirm it is really running

Attached is not the same as working. Open the Toolbox (MT5) or Terminal (MT4) panel with Ctrl+T and look at two tabs:

  • Experts: messages printed by the EA itself. Most tools print a start-up line with their version, license status and the symbol they detected. Errors such as “symbol not found” or “invalid license” appear here.
  • Journal: messages from the terminal. Look for a line confirming the EA loaded successfully and no “cannot open file” or “DLL not allowed” errors.

Some EAs draw a status panel on the chart; the documentation will describe what a healthy panel looks like. If the tool only trades at certain sessions or after certain conditions, it may be correct for it to sit idle for hours. Check the documentation before assuming it is broken.

Step 7: Activate the license

Tools sold here bind to your account and terminal. Depending on the product, activation happens automatically on first attach, or the EA asks you to enter your license key in its inputs. Your key is under Account → Licenses; copy it exactly. Each product page lists the activation limit — two terminals by default. If you later move to a VPS, release the old activation from your account first. The License policy explains transfers.

Test on demo first

Attach the EA to a demo account with the same broker and account type you intend to trade live and watch it through several sessions. Confirm that lot sizes match what you expect, that orders are accepted (no “invalid stops” errors in the Journal) and that the EA behaves as documented around news events and rollover. Only then move to a live account, starting with small risk. Our guide Risk management controls covers the settings to review before going live.

Common installation mistakes

  1. Copying files into the terminal's program folder instead of the data folder.
  2. Using an MT4 file in MT5 or vice versa.
  3. Forgetting the Allow Algo Trading tick in the EA's Common tab even though the toolbar button is green.
  4. Attaching to a symbol with a suffix (for example EURUSD.pro) when the EA expects a plain name; most tools detect suffixes, but check the Experts tab.
  5. Closing the terminal at night and expecting positions to be managed. An EA only works while the terminal is running; see Choosing a VPS.

If something still refuses to work, the troubleshooting guide covers the specific error messages, and our support team will ask you for the Experts and Journal log lines described above.

All guides