How to Install and Run an EA on MT5 (Step by Step)

By the Victoryalgo team · · 7 min read

You have an Expert Advisor (EA) file for MetaTrader 5 (MT5), and you want it running on a chart. This guide shows you how, step by step.

New to EAs? Start with our complete guide to Expert Advisors. Always install a new EA on a demo account first.

Before You Start: Check the File Type

  • .ex5 is the compiled file that MT5 runs. This is usually what you need.
  • .mq5 is the source code. Press F4 in MT5 to open MetaEditor, open the file and click Compile to create the .ex5 file.
  • .ex4 and .mq4 files are for MT4 and do not run on MT5. See MT4 vs MT5: Which Is Better for Your Expert Advisor?

Some EAs come with extra files, such as a custom indicator or a settings file (.set). Keep them together.

Step 1: Copy the EA Into the Data Folder

  1. In MT5, click File, then Open Data Folder.
  2. A Windows folder opens. Open MQL5, then Experts.
  3. Copy your .ex5 file into the Experts folder.
  4. If the EA uses a custom indicator, copy it into MQL5, then Indicators. Library files from your developer go into MQL5, then Libraries.

Always use Open Data Folder instead of guessing the path. If you have more than one MT5 installed, each one has its own data folder.

Step 2: Refresh the Navigator

Go back to MT5 and open the Navigator window (Ctrl+N). Right-click Expert Advisors and choose Refresh. Your EA should now appear. If not, restart MT5.

Step 3: Attach the EA to a Chart

Open a chart of the symbol and timeframe the EA was built for, such as EURUSD H1. Drag the EA from the Navigator onto the chart, or double-click it.

Each chart can run only one EA at a time. To run an EA on another symbol, open another chart.

Step 4: Check the Settings Window

A settings window opens. The two tabs you need most are Common and Inputs.

The Common Tab

  • Allow Algo Trading: tick this box. Without it, the EA cannot place trades.
  • Allow DLL imports: leave this off unless your developer says the EA needs it. See the DLL section below.

The Inputs Tab

This tab lists the EA's settings, such as lot size, risk percent, stop loss and take profit. Double-click a value to change it. Use Load to open a .set file from your developer, and Save to keep your own settings.

You may also see other tabs, depending on your MT5 version. When you are ready, click OK.

Step 5: Turn On the Algo Trading Button

On the top toolbar, find the Algo Trading button. It is the main switch for all EAs in the terminal. In current versions, its icon is green when it is on and red when it is off. When it is off, no EA can trade. Older MT5 versions called it AutoTrading.

Step 6: Check the Status Icon on the Chart

In the top-right corner of the chart you will see the EA's name and a small icon. It depends on your MT5 version:

  • Current versions show a small hat icon. When it is coloured (blue), the EA is allowed to trade. When it is grey, it is not.
  • Older versions show a smiley face. A smile means trading is allowed. A sad face means it is not.

If the icon is grey or sad, check the Algo Trading button and the Allow Algo Trading box. To open the EA settings again, press F7 on the chart.

Step 7: Read the Experts and Journal Tabs

Open the Toolbox window (Ctrl+T). Two tabs matter here:

  • Experts: messages from the EA itself, such as trade results and errors.
  • Journal: messages from the terminal, such as connection status and trade requests.

Check both tabs after you attach the EA, and again after its first trade. If you need help, send your developer a screenshot of both tabs.

DLL and WebRequest Settings (Only If Needed)

Turn these on only when your developer says the EA needs them.

  • DLL imports let an EA use outside Windows program files (DLLs). A DLL can do almost anything on your computer, so only allow it for an EA you trust. The setting is in Tools, Options, Expert Advisors, and on the EA's Common tab.
  • WebRequest lets an EA send or receive data from a website. In the same Expert Advisors options, tick Allow WebRequest for listed URL and add the exact address your developer gives you.

MT4 Differences in Short

  • The folder is MQL4, then Experts, and the files are .ex4 or .mq4.
  • The main button is called AutoTrading.
  • On the Common tab, the box is called Allow live trading.
  • The status icon on the chart is a smiley face.

The other steps are very similar. See our MT4 EA development service for MT4 EAs and MT4 to MT5 conversion.

Common Errors and Fixes

ProblemWhat to check
The EA is not in the NavigatorWrong folder, the data folder of a different MT5, or an .mq5 file that was never compiled.
The EA is on the chart but does not tradeThe Algo Trading button, the Allow Algo Trading box, and the EA's own filters, such as trading hours or maximum spread. Also check that you did not log in with the read-only (investor) password.
Algo trading turned off by itselfMT5 can turn it off when you change account or profile. Check the Expert Advisors options, then turn the button on again.
Invalid stopsThe stop loss or take profit is too close to the price for your broker's rules.
Not enough moneyThe lot size is too big for your free margin.
Invalid volumeThe lot size is below the minimum, above the maximum, or does not match the broker's lot step.
Unsupported filling modeThe EA's order fill type does not match the broker's settings. It may need a small code change.
No trades on a symbol with a suffixSome symbol names have extra letters, such as EURUSD.m. If the EA uses a fixed symbol name, it may need an update.

Running the EA on a VPS

The EA only runs while MT5 is open and connected. If your PC sleeps or loses internet, the EA stops. A VPS is a remote computer that keeps the terminal running day and night.

The steps on a VPS are the same as above. Then remove the EA from your home PC, so only one copy trades the account. Read Do You Need a VPS to Run Your EA? A Simple Guide.

A bot follows your rules, but results depend on your strategy and the market. You can lose money, so always test on a demo account first. To test the EA on past data, read How to Backtest an EA in the MT5 Strategy Tester.

Need an EA Built or Set Up?

Victoryalgo codes traders' own strategies through our MT5 EA development service, and we help you set up the EA on your own PC or VPS.

Have a strategy you want to run as an EA? Send us your strategy on WhatsApp for a free consultation. The Victoryalgo team will read your rules and explain how they can be coded and set up.

Victoryalgo is a software development company, not registered with SEBI or any financial regulator. This guide is general education about software, not investment advice. Forex and CFD trading is high risk. Indian residents may trade forex only through RBI-authorised channels.

Frequently Asked Questions

Where do I put an EA file in MT5?

In the Experts folder inside the MQL5 folder. Open it from File, then Open Data Folder in MT5. Then refresh the Navigator so the EA appears.

Why is my EA on the chart but not trading?

Check the Algo Trading button, the Allow Algo Trading box on the Common tab and the status icon. Then read the Experts and Journal tabs, because the EA's own filters or a broker rule may be blocking trades.

Can I run an MT4 EA on MT5?

No. MT4 files (.ex4 or .mq4) only run on MT4. The EA has to be rewritten in MQL5 to run on MT5.

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

Yes. The EA only runs while MT5 is open and connected. A VPS lets it keep running when your own PC is off.

More Guides

Want your strategy coded?

Send your rules on WhatsApp. Free consultation, clear quote.

WhatsApp Your Strategy

Risk & Regulatory Notice

  • We are NOT registered with SEBI or any financial regulator. We do not give investment advice, tips or signals, recommend brokers, manage money or trade for you.
  • Software only: we code the rules you give us. Nothing on this page is investment advice.
  • A bot follows your rules. It can't promise profit, and past or backtest results don't show future results.
  • Trading forex, gold, indices and CFDs is high risk. You can lose money, so always test on a demo account first.

Victoryalgo · Software development company · Based in India, working globally

Regulatory status, risk disclosure & policies
Chat with us