BZ Trading Bots logoBZ Trading Bots العربية
How to Install an Expert Advisor (EA) on MT5: Step by Step
BZ Trading Bots

How to Install an Expert Advisor (EA) on MT5: Step by Step

By the BZ Trading Bots team · 20 November 2026 · Updated 22 November 2026 · 5 min read

Installing an Expert Advisor (EA) on MetaTrader 5 takes about five minutes: you copy the EA file into MT5's Experts folder, attach it to a chart, load its settings and switch on Algo Trading. This guide walks through each step, with the most common problems and how to fix them.

Quick steps

  1. In MT5, click File → Open Data Folder and open MQL5 → Experts.
  2. Copy the .ex5 file into the Experts folder.
  3. In the Navigator (Ctrl+N), right-click Expert Advisors → Refresh.
  4. Open the right chart, such as XAUUSD, on the timeframe the EA needs.
  5. Drag the EA onto the chart, tick Allow Algo Trading, load the set file and click OK.
  6. Click Algo Trading in the toolbar so it turns green.

The full guide with the details of each step is below.

What you need

  • MetaTrader 5 installed on Windows, or on a Windows VPS. (The MT5 mobile app cannot run Expert Advisors.)
  • The EA file, which ends in .ex5 (compiled) or .mq5 (source code).
  • A set file (.set) if the EA comes with ready-made settings.
  • A logged-in trading account (demo or real) in MT5.

Step 1: Open the data folder

In MT5, click File → Open Data Folder. A Windows folder opens. Go into MQL5 → Experts. This is where MT5 looks for Expert Advisors.

Step 2: Copy the EA file

Copy your .ex5 file into the Experts folder. You can create a sub-folder (for example "BZ Trading Bots") to keep things tidy. If the EA uses extra files such as libraries, copy them to the folders the provider tells you.

Step 3: Refresh the Navigator

Back in MT5, open the Navigator window (Ctrl+N). Right-click Expert Advisors and choose Refresh. Your EA now appears in the list. If it does not, restart MT5.

Step 4: Open the right chart

Open a chart of the symbol the EA trades. For gold this is usually XAUUSD, but some brokers use a suffix, such as XAUUSD.m or XAUUSDc on cent accounts. Set the timeframe the EA expects, such as H1 or M1. The wrong symbol or timeframe is the most common reason an EA does nothing.

Step 5: Attach the EA to the chart

Drag the EA from the Navigator onto the chart, or double-click it. A settings window opens:

  • On the Common tab, tick Allow Algo Trading.
  • On the Inputs tab, click Load and choose the set file if you have one. Check the values look right.

Click OK.

Step 6: Turn on Algo Trading

At the top of the MT5 terminal, click the Algo Trading button so it turns green. This is the master switch: when it is off, no Expert Advisor can trade. In the top-right corner of the chart, the EA's icon should now show it is active.

Step 7: Check the EA is running

Open the Toolbox (Ctrl+T) and look at the Experts tab. You should see a line saying the EA was loaded successfully. Any errors also appear here. Keep MT5 open: the EA only runs while the terminal is running, which is why most traders use a VPS. See how to set up a VPS for MT5.

Using an Expert Advisor in MT5 on a Mac

MetaQuotes offers an official MetaTrader 5 for macOS. It runs Expert Advisors, and the steps are the same as above: File → Open Data Folder opens the MQL5 folder in Finder, where you copy the EA into Experts. Because the Mac version runs Windows code in the background, a few EAs or DLL-based tools may not work, and a sleeping MacBook stops the EA. For a bot that must run 24/5, a Windows VPS is the most reliable choice, and you can still manage it from your Mac with a remote desktop app.

Common problems and fixes

  • The EA does nothing: check the Algo Trading button, the "Allow Algo Trading" tick, the symbol name and the timeframe.
  • "Trade is disabled": your account or symbol may not allow trading at that moment, or the market is closed.
  • "Not enough money": the lot size is too big for the balance. Use a smaller risk setting or a cent account.
  • The EA disappears after restart: make sure the file is in MQL5 → Experts of the same MT5 installation you open.
  • Licence error: some EAs are locked to an account number. Contact the provider.

Test before you trade live

Before running any EA on real money, run it in the Strategy Tester (Ctrl+R) and on a demo account. Learn how to judge the results in how to read an MT5 Strategy Tester report.

Prefer not to do it yourself?

For BZ Dollar Machine and BZ Cent Machine, our team does the whole installation for you by AnyDesk, including the set file and VPS. See our trading bots.

Choosing a gold bot? Read how to choose the best gold trading bot for the six bot types, 11 checks and red flags, and how to verify a trading bot's live results before you trust any account a seller shows you.

Related reading: XAUUSD EA for MT5: Setup and Settings Explained and MT4 vs MT5 for Gold Trading Bots.

Frequently asked questions

Where do I put an EA file in MT5?

In MT5, click File → Open Data Folder, then open MQL5 → Experts and paste the .ex5 file there. Then refresh the Expert Advisors list in the Navigator.

Why is my Expert Advisor not trading?

The most common reasons are that the Algo Trading button is off, "Allow Algo Trading" is not ticked, the EA is on the wrong symbol name or timeframe, or the market is closed.

Can I run an EA on the MT5 mobile app?

No. The MT5 apps for Android and iPhone cannot run Expert Advisors. You can use them to watch the trades while the EA runs on a computer or VPS.

Does MT5 have to stay open for the EA to work?

Yes. The EA only runs while MT5 is open and connected, which is why most traders use a VPS that stays on 24 hours a day.

BZ Trading Bots
BZ Trading Bots
We build and test gold (XAUUSD) trading bots for MetaTrader 5. Every figure in our articles comes from our own MT5 Strategy Tester reports, shown in full on our Results page.

Risk warning: trading gold (XAUUSD) on margin is high risk and you can lose some or all of your deposit. Backtest results are not live results, and past performance does not guarantee future results. This article is general information, not investment advice.

More from the Blog