YoForexEA
Installation & SetupBeginner6 min read

HOW TO INSTALL AN EXPERT ADVISOR ON MT5

Complete installation guide for MetaTrader 5 Expert Advisors (.ex5 and .mq5), Algo Trading permissions, hedging vs netting checks, and chart verification.

By YoForexEA Research Desk

Quick Summary

To install an Expert Advisor on MT5, click File > Open Data Folder, open MQL5 > Experts, and copy your .ex5 or .mq5 file inside. Refresh the Navigator panel (Ctrl+N), enable Allow Algo Trading in Tools > Options > Expert Advisors, attach the EA to your chart, and confirm the green hat icon appears in the top-right corner.

Before Installing on MetaTrader 5

MetaTrader 5 uses the MQL5 language and compiled .ex5 binaries. Keep these prerequisites in mind before moving files:

  • Correct Binary Format: Ensure you have an .ex5 or .mq5 file. MT4 .ex4 files are incompatible with MT5.
  • Account Accounting Mode: Check whether your MT5 broker account is set to Hedging or Netting mode (displayed in the terminal title bar or account details). Multi-order grid or simultaneous long/short EAs typically require a Hedging MT5 account.
  • Preset & Indicator Paths: Store .set files in MQL5/Presets and custom indicators in MQL5/Indicators.

Step-by-Step MT5 EA Installation

  1. Locate the EA File: Unzip your download folder and find the .ex5 (compiled) or .mq5 (source) Expert Advisor file.
  2. Open the MT5 Data Folder: Launch MetaTrader 5, click File in the top menu, and choose Open Data Folder.
  3. Navigate to MQL5 > Experts: Open the MQL5 directory and double-click the Experts folder (you may optionally place EAs inside a subfolder like Experts/Advisors).
  4. Paste the EA File: Copy the .ex5 or .mq5 file into MQL5/Experts.
  5. Refresh Navigator or Restart MT5: Press Ctrl+N to open Navigator, right-click Expert Advisors, and select Refresh. If you placed an .mq5 source file, double-clicking or refreshing triggers compilation into .ex5.
  6. Enable Algo Trading Globally: Navigate to Tools > Options > Expert Advisors, check Allow Algorithmic Trading, and click OK. Make sure the main toolbar Algo Trading button displays a green play icon.
  7. Attach the EA to the Chart: Open the intended currency pair, gold, or index chart on the required timeframe, drag the EA onto the chart, confirm Allow Algo Trading in the Common tab, configure risk parameters on the Inputs tab, and click OK.
  8. Verify Active Status: Check the top-right corner of the chart for the EA name next to an active graduation-cap icon (colored/blue-green rather than gray/red) and confirm clean initialization in the Toolbox Experts tab.

MT5 Verification Checklist

  • Check Symbol Suffixes: Brokers often label pairs XAUUSD.pro, EURUSDm, or US30.cash. Attach the EA to the exact tradeable chart symbol listed in Market Watch.
  • Inspect Toolbox Logs: Always check both the Experts tab (EA prints and initialization errors) and the Journal tab (broker connection and order server replies).
  • Test on Demo First: Run Strategy Tester using Every tick based on real ticks and validate live behavior on a demo terminal before committing real capital.

ACTION CHECKLIST

  1. Locate the MT5 EA file: Extract any compressed package and locate the .ex5 or .mq5 file.
  2. Open MT5 Data Folder: In MetaTrader 5, click File > Open Data Folder.
  3. Open MQL5 Experts: Navigate into MQL5 > Experts inside the Data Folder window.
  4. Paste the EA file: Copy the .ex5 or .mq5 file into MQL5/Experts.
  5. Refresh Navigator: Press Ctrl+N in MT5, right-click Expert Advisors, and click Refresh (or restart MT5).
  6. Enable Algo Trading: Open Tools > Options > Expert Advisors, enable Allow Algorithmic Trading, and activate the Algo Trading toolbar button.
  7. Attach EA to chart: Drag the EA onto the target symbol and timeframe, check Allow Algo Trading under Common, configure Inputs, and click OK.
  8. Verify status icon and logs: Confirm the active EA icon in the top-right chart corner and check the Experts tab for clean startup.

FREQUENTLY ASKED QUESTIONS

Why is my MT5 EA icon gray or showing a red stop badge?

A gray or red EA badge means algorithmic trading is blocked either globally (click the Algo Trading button in the main MT5 toolbar) or on that chart (press F7, open Common, and check Allow Algo Trading).

Does an MT5 Expert Advisor work on both Hedging and Netting accounts?

Only if coded to handle both. Many multi-position EAs expect a Hedging account and fail or merge positions unexpectedly on a Netting account. Check your account type with your broker before going live.

Where do .set preset files go in MetaTrader 5?

Place preset files in File > Open Data Folder > MQL5 > Presets so you can load them quickly from the Inputs tab when attaching the EA.

EXPLORE RELATED EA HUBS

MT5 Expert Advisors →MT5 Indicators →US30 Index EAs →

CONTINUE READING

EXPLORE VERIFIED EXPERT ADVISORS

Browse MT4 and MT5 bots, indicators, and setup resources across YoForexEA.

Browse EAsAll 18 GuidesEA FAQ