Home Free Tools Trading Guides Blog Pricing FAQ ๐Ÿ” Customer Login

How to Install and Set Up an EA on MT5, Step by Step

This walkthrough covers the MT5 install from start to finish. You will see which file goes where, the two permissions an EA needs, how to attach it to a chart, and how to read the logs when nothing happens.

How to Install and Set Up an EA on MT5, Step by Step

Key takeaways

  • An .ex5 file runs in MT5; an .mq5 file must first be compiled in MetaEditor with F7.
  • EAs belong in MQL5\Experts inside the data folder, and the Navigator needs a refresh afterwards.
  • Two separate permissions must be on: the terminal's Algo Trading button and the EA's own Allow Algo Trading box.
  • The Experts tab shows what the EA prints; the Journal tab shows what the terminal and server did.

In this article

First, identify which file you actually downloaded

An Expert Advisor (EA) is a program that runs inside MetaTrader 5 and can send orders on your behalf. Two things have to be right before any of that can happen: the file has to be in the right place, and the terminal has to be told to allow it.

Start with the file extension:

One quirk worth knowing: source files (.mq5) are not displayed in the Navigator window of the trading platform. If you drop a .mq5 into the folder and see nothing in the list, that is why โ€” compile it first.

Put the file in the right folder, then refresh the Navigator

All Expert Advisors are stored in the /MQL5/Experts folder of the trading platform. To get there, click File โ†’ Open data folder in the terminal, then place each file by type:

FileFolder inside the data folder
Expert Advisor (.ex5 or .mq5)MQL5\Experts
Preset (.set)MQL5\Presets
Custom indicator (.ex5 or .mq5)MQL5\Indicators
Script (.ex5 or .mq5)MQL5\Scripts

Now make MT5 notice the new file. Open the Navigator with Ctrl+N, expand the Expert Advisors section, right-click inside the Navigator window and select Refresh. Restarting the terminal does the same job.

Only obtain files from sources you trust. An EA runs with the permissions you give it, and a file from an unknown source is a security question, not just a trading one. Before you install anything, check what the developer says about DLL imports and external connections, and whether they can explain why the EA needs them.

Turn on the two switches that let an EA trade

MT5 has two separate permissions, and both must be on. With either one off, the EA keeps reading the market and places nothing.

SwitchWhere it livesWhat it controls
Algo Trading buttonTop toolbar, next to New OrderThe whole terminal. Off is a red square icon, on is a green triangle. When it is off, no Expert Advisor in the terminal can place or close trades.
Allow Algo TradingThe EA's own properties, Common tabThat one robot. With the box unticked it cannot trade, whatever the toolbar button shows.

Click the toolbar button to switch it on; on Windows, Ctrl+E toggles it for the whole terminal. Then open Tools โ†’ Options โ†’ Expert Advisors and confirm Allow algorithmic trading is ticked. Two boxes on that same tab are worth unchecking: Disable algorithmic trading when the account has been changed and Disable algorithmic trading when the profile has been changed. Their names describe what they do, and the setup guide published by one broker's help centre recommends unticking both.

You will also see Allow DLL imports. MetaTrader labels it potentially dangerous and advises enabling it only for trusted applications. Leave it off unless the developer has explained why the EA needs it and you trust them.

Attach the EA to a chart and set its inputs

Drag the EA from the Navigator onto the chart you want it to trade. A settings window opens with several tabs:

Click OK to attach it.

Worked example: turning a risk amount into a lot size (hypothetical)

Say you have a $10,000 account and decide to risk 1% on a trade, which is $100. The EA's stop loss sits 3.00 away from the entry price. To convert that into a lot size you need the value of a 1.00 price move per lot, which comes from the symbol specification in your terminal โ€” check the contract size and tick value shown for your symbol rather than assuming.

For this hypothetical, assume the specification says a 1.00 move is worth $100 per lot. That $100 is an assumption picked to make the arithmetic easy; it is not a broker specification and not a figure taken from any source. Your own symbol's contract size and tick value will give a different number. With that assumption, a 3.00 stop is $300 of risk per lot, and $100 รท $300 = 0.33 lots. Check the volume step before typing that in: with a step of 0.01, 0.33 is valid; with a minimum of 0.10 and a step of 0.10, you would round down to 0.30. If the EA calculates lots itself, compare its output against the Volume min, max and step in the symbol specification โ€” a mismatch is what produces error 10014 later.

Confirm the EA is actually running

Look at the top-left corner of the chart. A blue hat mark means the EA is running; a white one means it is stopped.

Then open the Toolbox window at the bottom of the terminal with View โ†’ Toolbox, or Ctrl+T. The Journal tab records terminal events, including an EA being loaded, removed or failing to load โ€” that is where to look if you are unsure whether the attach actually took. The Experts tab holds what the EA itself prints, so it is the place to check once the EA is loaded and you want to see what it is doing.

Remember that a running EA is not the same as a trading EA. An EA may wait for specific conditions and sit idle for long periods, so a quiet chart with a blue icon is not automatically a fault.

Read the logs: the Experts tab and the Journal tab do different jobs

MT5 writes expert advisor messages to two places, and reading them side by side usually tells you whether you have a permissions problem, a symbol problem or an order problem.

TabWhat it holdsUse it when
ExpertsOutput generated by MQL5 programs: anything the EA prints, trade request errors the code logs, and initialisation failures such as OnInit returning a failure because an input is out of range.The EA is loaded but behaving oddly or refusing to start.
JournalTerminal events independent of any EA's code: connection and authorisation to the trade server, disconnections, EAs being loaded, removed or failing to load, changes to algorithmic trading permission, and order requests sent to the server with the result.Nothing happens at all, or orders are rejected.

On disk, the terminal log is in the Logs folder and the EA log is in MQL5\Logs, both reachable through File โ†’ Open Data Folder, with files named by date.

When it still does nothing: return codes worth knowing

Trade requests that fail come back with a numeric code. These are the ones that point at setup rather than strategy.

CodeMeaningWhere to look
10027Autotrading disabled by the client terminalThe Algo Trading button in the toolbar is off.
10026Autotrading disabled by the serverBroker side โ€” often an investor (read-only) login, or an account type that blocks EAs.
10017Trade disabledCan apply to the whole account or to one specific symbol.
10014Invalid volumeLot size below the minimum, above the maximum, or not a multiple of the volume step. Compare with Volume min, max and step in the symbol specification.
10016Invalid stopsStop loss or take profit too close to price. Check the stops level and freeze level in the specification.

Two of these are worth separating in your head. 10027 is your own toolbar button โ€” you can fix it in one click. 10026 comes from the broker side, so the thing to check is the login and account type you are using: an investor (read-only) login or an account type that blocks EAs will produce it.

The descriptions above come from a third-party blog post on MT5 EA log errors, not from MetaTrader's own documentation. For the full list of return codes, consult MetaTrader's documentation and your broker's symbol specification.

Installation checks before you leave it running

Installation is the easy part. These are the checks that confirm the install itself is sound before you rely on it.

  1. File and folder. The file is an .ex5, it sits in MQL5\Experts, and it appears in the Navigator after a Refresh.
  2. Both permissions. The toolbar Algo Trading button shows the green triangle, and the EA's own Allow Algo Trading box on the Common tab is ticked.
  3. Right chart, right symbol. Attach the EA to the chart of the symbol you intend it to trade, and check that symbol's specification โ€” Volume min, max and step, plus the stops and freeze levels โ€” against the inputs you set.
  4. DLL imports. If the EA shows a Dependencies tab, decide deliberately whether to allow DLL imports, and only do so if the developer has explained why it is needed.
  5. Logs after attaching. Check the Journal tab for the load event and the Experts tab for initialisation failures before you walk away.
  6. If you are on a prop firm account, check that firm's published rules before you run anything. Requirements differ between firms, so read the documentation the firm itself publishes rather than relying on second-hand summaries.

Nothing here makes an EA safe or profitable. A correct installation only means the program is allowed to do what its code says โ€” the risk sits in the strategy, the position size and the market conditions, not in the folder path.

Disclosure: this site sells Gold Rush Algo, an MT5 Expert Advisor for gold. It is one of the EAs you might install this way, and the same checks apply to it as to any other EA.

Frequently asked questions

Why doesn't my EA show up in the Navigator after I copied it?

Check three things: the file is in MQL5\Experts, it is an .ex5 rather than an uncompiled .mq5, and the Navigator has been refreshed. Right-click inside the Navigator and choose Refresh, or restart the terminal.

Do I need to tick Allow DLL imports?

Only if the EA actually imports a DLL and you trust the developer. MetaTrader labels the option potentially dangerous and advises enabling it only for trusted applications, so leave it off by default.

The EA is attached and the icon is blue, but no trades appear. Is it broken?

Not necessarily. An EA may wait for specific conditions and sit idle for long periods. Check the Experts and Journal tabs for printed messages or rejected order requests before assuming a fault.

Why did my EA stop trading after I switched accounts?

MT5 has two options that disable algorithmic trading when the account or profile changes. Open Tools โ†’ Options โ†’ Expert Advisors, check whether either 'Disable algorithmic trading when...' box is ticked, then re-check the toolbar button and the EA's own Allow Algo Trading setting.

What does error 10027 mean?

Autotrading disabled by the client terminal โ€” the Algo Trading button in the toolbar is off. Click it so it shows the green triangle and the EA can send orders again.

Free tools mentioned in this article

Related guides: What is a lot?, Trading glossary.

Sources

Sources checked on 5 November 2026. Rules and figures from third parties can change, so check the original before relying on them.

More from the blog

Want to test an EA on your own platform?

Gold Rush Algo is an MT5 Expert Advisor for XAUUSD. Download the free backtest version and judge it with your own numbers before deciding anything.

Disclaimer: This article is for educational purposes only and is not financial advice. Examples use hypothetical numbers and past or simulated results do not guarantee future results. Trading leveraged products carries a high risk of loss and is not suitable for everyone. See our full risk disclaimer.