Home › Guides › Automation › Installing an EA

Installing an EA in MetaTrader 5 step by step

By Luis Sanches y Milton Bertillo, mentors at SHEFA Trading Academy · Updated 21 September 2026 · Reading time: 6 min

Installing an expert advisor is a two-minute job… if you know where the file goes and what permission to give it. 90% of “my bot doesn't work” cases are actually terminal permissions or missing history. Here is the full process and, further down, the checklist for when something won't start.

Before you start

Step 1 · Open the data folder

In MetaTrader 5: File → Open Data Folder. This opens the folder where the terminal stores everything of yours (profiles, templates and programs). Inside it, the path we're interested in is MQL5\Experts.

Step 2 · Copy the file and refresh the Navigator

Copy the .ex5 into MQL5\Experts (if you want to keep things organised, inside a subfolder with its name). Go back to the terminal and, in the Navigator, right-click on Expert Advisors → Refresh. The expert advisor should appear there.

If it doesn't appear, in 99% of cases it's because the file was copied into a different data folder: there are different MetaTrader 5 installations (for example, one per broker). Check that the folder you opened is the one for the terminal you're looking at.

Step 3 · Authorise algorithmic trading

There are two permissions and you need both:

  1. In the terminal: button «Algorithmic trading» on the toolbar (or Tools → Options → Expert Advisors → Allow algorithmic trading). It must remain enabled.
  2. In the expert advisor: when attaching it, on the tab «Common», tick «Allow algorithmic trading» and decide whether it can trade only on demo or also on a live account.

Step 4 · Attach it to the correct chart

Drag the expert advisor from the Navigator to the chart of the symbol and timeframe you want. Its properties window opens with two tabs that matter:

TabWhat is configured
CommonPermissions: algorithmic trading (yes/no), trade only on demo or also live, and whether it can open files or make web requests
InputsThe parameters the programmer has left configurable (risk, schedules, limits). If the expert advisor carries them inside the code, this tab appears empty: that means there is nothing that can be set incorrectly
A detail that surprises many people: an expert advisor only receives the ticks from the chart it is on. If you attach it to another symbol, it will keep looking at that chart. To trade several instruments, you open an instance on each one (with a different identifier) or program an expert advisor that checks all of them from a single chart.

Step 5 · If the expert advisor makes web requests

MetaTrader 5 blocks by default any internet connection made from an expert advisor. If yours sends or receives data from a website (for example, to publish its markings or read levels), you must authorise the exact address in Tools → Options → Expert Advisors → Allow WebRequest for the following URLs, adding it to the list. Without that permission, the call returns an error even if everything else is correct.

Step 6 · Check that it is working

When something does not work: six causes, in order of probability

What you seeWhat happensSolution
Sad faceAlgo Trading permission missing (terminal or 'Common' tab)Enable in both places
Does not appear in the NavigatorFile in another data folder or not refreshedCheck the path MQL5\Experts and click Refresh
It smiles but does not trade anythingTime filter, high spread or entry condition not metCheck the log and the time parameters
Numerical errors in the logLot below the minimum, stop shorter than the symbol minimum or insufficient marginAdjust risk or distance; for synthetics, check the symbol contract
The expert is unloaded when changing timeframeChanging chart can unload experts depending on the terminal settingsWatch the face after each change; check the unload-on-period-change option
Stops trading at night or when the computer is switched offThe expert lives inside the terminalLeave the terminal open on a computer that is switched on or use a server

If you need it to work 24/7

An expert needs the terminal open. For synthetic indices, which trade without pause, this is relevant: if you switch off the computer, trading stops. There are two realistic options: a computer you can leave switched on, or a Windows server running MetaTrader 5 with the session open. The managed hosting offered by MetaQuotes (its VPS service) is designed to host experts and indicators, not to install your own programs: if your system also needs an external program (for example, a Python bot or a local connector), it has to be your own server.

Frequently asked questions

Where is the EA file copied to in MetaTrader 5?

In the terminal data folder, within MQL5\Experts, which is opened from File → Open Data Folder. Then you have to refresh the Navigator so that it appears in the Expert Advisors branch.

Why is the EA's face sad?

Because it is loaded without permission to trade. This is solved by enabling the terminal's 'Algo Trading' button and ticking 'Allow Algo Trading' on the expert's 'Common' tab. If necessary, also enable the general option in Tools → Options → Expert Advisors.

Why does it not send trades even though it is authorised?

For execution reasons: symbol without history, lot below the minimum, stop shorter than the permitted minimum, spread above the filter, daily market pause or a time filter. The log on the 'Experts' tab usually indicates the exact reason.

My EA needs to connect to a website: why doesn't it work?

Because MetaTrader 5 blocks experts' web requests until you authorise the exact address in Tools → Options → Expert Advisors → Allow WebRequest. Without that permission the function returns an error and the expert is left without data.

Can it trade if I switch off the computer?

No. The expert runs inside the terminal: if MetaTrader 5 closes, it stops trading. For it to work without depending on your computer, you have to use a server (VPS) with the terminal open.

Can it be tested without risking money?

Yes, and it is mandatory before putting money in: first the Strategy Tester to validate the logic and then a demo account with the same broker for a period that includes quiet days and busy days.

Installed doesn't mean ready

At the academy, no expert advisor is allowed to trade until you understand which rules it executes and with what size. The installation is the easy step; the one that decides the result is the other.

View access plans →

Keep reading

Risk warning. A poorly configured expert advisor can open and close positions without you watching. Before leaving it on a real account, test it on demo and with risk limits. Synthetic indices and CFDs are leveraged products with high risk of loss. Educational content, not financial advice.