All guides · Trading bots

How to Install an EA in MT5

Step-by-step: copy an Expert Advisor into MetaTrader 5, compile it, attach it to a chart and switch on Algo Trading.

What it is

Installing an EA in MetaTrader 5 means putting the bot's file in MT5's Experts folder, compiling it if you have the source code (.mq5), and attaching it to a chart with algorithmic trading allowed. It takes about five minutes.

Step by step

  1. In MetaTrader 5, open File → Open Data Folder.
  2. Open the MQL5 folder, then Experts, and copy your bot's file (.mq5 or .ex5) into it.
  3. If you have the source file (.mq5), open MetaEditor (press F4), find the file under Experts, and click Compile (F7). The Errors tab should show 0 errors.
  4. Back in MetaTrader 5, open the Navigator (Ctrl+N), right-click Expert Advisors and choose Refresh. Your bot appears in the list.
  5. Open a chart of the market the bot was built for, then drag the bot from the Navigator onto the chart.
  6. In the window that opens, go to the Common tab and tick Allow Algo Trading. Check the Inputs tab (risk per trade, stop distances) and click OK.
  7. Make sure the Algo Trading button in the top toolbar is switched on. The bot's name now shows in the top-right corner of the chart.

Why it matters

Most "my EA does nothing" problems come from a missed step: the file in the wrong folder, a compile error, or Algo Trading switched off. Following the steps in order avoids all three.

Good to know

Install it on a demo account first. Keep MetaTrader running: the bot only works while the terminal is open and connected. Check the Experts and Journal tabs at the bottom of the terminal for the bot's messages and any errors.

Common mistakes

Copying the file into the MQL4 folder or a subfolder MetaTrader doesn't scan; forgetting to compile the .mq5 file; leaving Algo Trading off; and attaching the bot to a different symbol than the one it was built for.

Related