MetaTrader 5 tutorial

How to Install an Expert Advisor in MT5

Add an Expert Advisor to MetaTrader 5, attach it to a chart, give it permission to trade and confirm it's running.

Beginner About 10 min(estimate) 7 stepsUpdated

Times are estimates — they vary with your computer, connection and experience.

Before you start

  • MetaTrader 5 installed and logged in — see How to Install MetaTrader 5.
  • The EA's MT5 file: a compiled .ex5 (an MT4 .ex4 will not load). Extract .zip downloads first.
  • Any .set preset files the developer supplies.
  • Ideally a demo account for the first run.

What you'll learn

  • Put the EA file in the right folder.
  • Attach it to a chart with the correct permissions.
  • Check from the logs that it's running.

Steps

  1. Step 1: Open the data folder

    In MT5, choose File → Open Data Folder, then open MQL5 → Experts.

  2. Step 2: Copy the EA file

    Paste the .ex5 file into Experts. A sub-folder per product keeps things tidy. Put any .set files in MQL5\Presets.

  3. Step 3: Refresh the Navigator

    Open the Navigator (Ctrl+N), right-click Expert Advisors and choose Refresh. The EA now appears in the list.

  4. Step 4: Attach the EA to a chart

    Open a chart with the symbol and timeframe from the EA's documentation, then drag the EA onto it or double-click it in the Navigator.

  5. Step 5: Allow it to trade

    In the properties window, on the Common tab, tick Allow Algo Trading (called Allow Auto Trading in older builds).

    If the developer says the EA uses DLLs, enable Allow DLL imports on the Dependencies tab — only for software you trust.

  6. Step 6: Review the inputs

    On the Inputs tab, check the lot-size and risk settings, or click Load to import a .set file. Configure EA settings explains the common inputs.

  7. Step 7: Turn on Algo Trading

    Click OK, then make sure the Algo Trading button on the main toolbar (called AutoTrading in older builds) is on. The EA's name and a status icon appear in the chart's top-right corner.

Expected result

The EA's name shows in the top-right of the chart with an active status icon, and the Experts tab of the Toolbox (Ctrl+T) shows that it loaded on your symbol without errors.

Troubleshooting

The EA isn't in the Navigator
Check it's an .ex5 in MQL5\Experts of the data folder (not Program Files), then refresh the Navigator or restart MT5.
"Algo trading is disabled" in the Experts tab
Both the toolbar Algo Trading button and the EA's own Allow Algo Trading (press F7 on the chart) must be on.
It loads but never trades
Follow Troubleshoot an EA That Isn't Trading.

Next tutorial

How to Configure Expert Advisor Settings

Configure an Expert Advisor's inputs in MT4 or MT5: lot size and risk, stop-loss units, magic numbers and spread limits, plus saving and loading .set files.

Continue

Related tutorials

All tutorials
  • Testing & RiskIntermediate

    How to Run a Strategy Backtest in MT5

    Run an Expert Advisor backtest in the MetaTrader 5 Strategy Tester: choose the modelling mode, deposit and delays, then read the report and graph honestly.

    About 30 min(estimate) 9 steps
  • Forex Bots & EAsIntermediate

    How to Troubleshoot an EA That Isn't Trading

    Work through the checks that fix most idle Expert Advisors in MT4 and MT5: permissions, market hours, the logs, broker rejections, filters and inputs.

    About 20 min(estimate) 8 steps