Article 1 explained what an EA is; this article covers the operating side: how an EA gets from a file on your disk to a running program on a chart, how to watch its first runs on a demo account, what its parameters mean, how traders keep one running around the clock on a VPS, and — just as important — how to stop one and take it off. By the end you will be able to run an EA on a demo account through its full life cycle: install, attach, configure, observe, stop, remove.
Prerequisite: “Expert Advisors (EAs) Explained: What an EA Is, and What It Is Not” (this batch, Article 1) — what an EA is and the terms this article uses.
Key points
- For a file obtained outside the Market, the route is: place it in the terminal’s Experts folder (through MT5’s own data folder), attach it to a chart, set its inputs, and turn on Algo Trading. Market products are installed by the terminal itself. Every first run belongs on a demo account.
- The EA’s parameters (inputs) are where your decisions live: lot size or risk setting, stop loss and take profit, indicator periods, trading hours, magic number. Record what you set — a result without its settings cannot be interpreted or repeated.
- An EA only works while the terminal runs and is connected. A VPS (a rented, always-on remote computer) is how traders run EAs continuously; MT5 offers a built-in virtual hosting service, and third-party VPS providers are the alternative.
- Watching an EA is a procedure, not a glance: the Experts/Journal logs, the positions it opens, and whether its behaviour matches its stated rules are the three things to check.
- Stopping is layered: switch off Algo Trading to stop all EAs trading, or remove the single EA from its chart. Removing an EA is not a platform action that closes its trades — its open positions normally remain open and become yours to manage — though an EA’s own shutdown code can act when it is removed, so check its documentation and test removal on the demo first.
Start trading with Exness
You can open an account here:
In plain words
Running an EA is a life cycle, and every first run belongs on a demo account: put the file in the terminal’s Experts folder (or let the MQL5 Market install it), attach it to the chart the author specifies, set its inputs, and switch on Algo Trading. The inputs are where your decisions actually live — lot size or risk setting, stop loss and take profit, indicator periods, trading hours, and the magic number that stamps the EA’s trades as its own — so record what you set, change one thing at a time, and never treat the author’s defaults as recommendations, because they were chosen for a different account. Then watch it as a procedure: the Experts and Journal logs, the positions it opens, and whether its behaviour matches its stated rules over days, not minutes. Because the EA only works while the terminal runs and is connected, round-the-clock running means a continuously running machine — your own computer for limited hours, or a VPS for all hours — and never two copies of the same EA on the same account. Stopping is part of the procedure too: switch off Algo Trading, or remove the EA from its chart — and remember that removing the program does not close its trades, which stay open and become yours to manage.
1. Installing and attaching an EA
- Get the file. An EA arrives as a compiled .ex5 file, or as source code (.mq5) that the MetaEditor program compiles into one. EAs obtained through the MQL5 Market are installed by the terminal itself; files obtained elsewhere are placed manually in the next step.
- Put it in the Experts folder. In MT5, use File → Open Data Folder, then open MQL5 → Experts and place the file there. Restart the terminal, or right-click the Navigator panel and choose Refresh: the EA then appears in the Navigator under Expert Advisors.
- Open the right chart. Choose the chart the author specifies. Most EAs work on the symbol and timeframe of the chart they are attached to, and many are written for a specific symbol and timeframe — an EA written for EURUSD H1 does not become a USDJPY M15 EA by being attached to one. (An EA’s code can also be written to work across symbols; the author’s instructions say which kind a given EA is.)
- Attach it. Drag the EA onto the chart (or double-click it). A settings window opens with the inputs described in section 2. On the Common tab, algorithmic trading must be permitted for the EA.
- Turn on Algo Trading in the toolbar. When an EA is running, its name and a small icon appear in the chart’s upper-right corner; the Experts tab of the Toolbox logs its start and its actions.
If anything in this sequence fails — the EA does not appear, or appears but does not trade — the Journal and Experts logs usually carry a message that identifies the reason (a permission off, a wrong account type, an error in the program), so check them first. Reading those logs is the basic troubleshooting skill for everything in this batch.
2. Parameters: the settings that are actually your decisions
The inputs window is where an EA stops being the author’s program and becomes your configuration. Names vary by EA, but the recurring ones are:
| Parameter | What it controls | What to check before the first run |
|---|---|---|
| Lot size / risk setting | How large each trade is — a fixed lot, or a size computed from a risk percentage | That the resulting size matches the account: a default written for a large account can be far too big for a small one |
| Stop loss / take profit | The exit levels the EA attaches to its trades, often in pips or points | Whether and how the EA limits losses at all — which exits it uses — and, where stop and take-profit inputs exist, that they are set, in the unit the EA expects (points are not pips — the glossary separates them) |
| Indicator periods and thresholds | The numbers inside the entry and exit rules (for example a moving average period) | That you know what each one does; changing them changes the method, not just the “settings” |
| Trading hours / days | The window in which the EA may open trades | That the window is in the time zone the EA expects (broker server time is common) |
| Magic number | The identifier stamped on the EA’s trades | That two EAs on one account use different numbers, and that each EA’s code actually filters by its number when managing trades — the number alone does not enforce the separation |
| Maximum spread / slippage filters | Conditions under which the EA refuses to trade | Whether they exist and are sensible for the symbol. Such filters may keep an EA out of some bad minutes, but they restrict trades; they do not eliminate execution risk |
Two disciplines matter more than any single value. First, change one thing at a time and write it down: an EA run is an experiment, and an experiment whose settings were not recorded cannot be repeated or judged. Second, defaults are the author’s choices, not recommendations: they were chosen to present the EA, often on a different account size, symbol and period than yours.
3. The first runs belong on a demo account
The order of operations is fixed: demo first, for long enough to see the EA behave, and only then any thought of real money. A useful demo run has three stages:
- Does it run? Attach the EA and watch the logs: it starts without errors, it evaluates its conditions, and when a condition occurs it opens the trade its rules describe — with the size, stop and take profit you set.
- Does it behave as described? Compare behaviour against the stated rules over days, not minutes: entries where the rules say entries belong, exits where the rules say exits belong, no trades outside the set hours, no sizes other than the set size. An EA that does something its description does not mention — doubling size after a loss, holding trades it should have closed — has told you something important, on virtual money.
- What does it cost and earn, in the record? Read the demo history the way Article 3 teaches for backtests: number of trades, average win and loss, largest drawdown, and the costs paid. Demo execution is simulated and can differ from live conditions — the demo article in this blog’s beginner batches sets out what a demo can and cannot teach — so a good demo result is permission to keep investigating, not a promise.
4. Keeping an EA running: the computer question and the VPS
Because the EA runs inside the terminal, continuous operation means a continuously running terminal. The two routes are:
- Your own computer, left on and connected while the EA trades. Workable for EAs that trade limited hours; fragile for anything that must react at any hour — updates, restarts, power and connection failures all stop the EA silently.
- A VPS (virtual private server): a rented remote computer that stays on around the clock, on which you install MT5 and run the EA exactly as on your own machine, checking in remotely. MT5 includes a built-in virtual hosting service that can be rented from inside the terminal and that synchronises the supported parts of your terminal environment — charts, EAs and settings — to a hosted server; check the service’s migration rules and the hosted terminal’s logs after migrating, including any restrictions, before relying on it. Third-party VPS providers are the alternative, and typically give a general Windows desktop instead. Either way, the checks are the same: the hosted terminal is logged into the intended account, the EA is attached and running there, and you are not also running the same EA on the same account at home (two copies can submit duplicate or conflicting orders).
A VPS reduces dependence on your own computer — hosting, network and configuration failures remain possible — and it does not solve judgement. A wrong rule on a VPS is wrong continuously, including while you sleep — which is why the demo stages of section 3 come first, and why alerts and regular log checks remain part of running any EA.
5. Stopping and removing an EA
Know the exits before the first run — and practise them on the demo account, where the stakes are virtual:
- Stop everything at once: switch off the Algo Trading button. All EAs on all charts stop trading (they remain attached and will resume if the button is switched back on).
- Stop one EA: right-click its chart → Expert Advisors → Remove. The EA is detached and stops acting. Its open trades stay open, as far as the platform is concerned — removing the program is not a close instruction; the positions become yours to close or manage by hand, and stop loss and take profit orders already placed with the broker remain in place. One caveat: an EA can be programmed to act as it shuts down. If its documentation says it closes its trades on removal, that is the EA’s own code acting, not the platform — which is why removal, like everything else in this batch, is rehearsed on the demo first.
- Close the chart the EA is attached to: same effect as removing it, for that EA.
- Check afterwards: after stopping, look at the account — open positions, pending orders — and confirm that what remains is what you intend to manage manually. The dangerous state is not “EA off” but “EA off and forgotten trades still open”.
Summary — what to take away
- Install through the data folder’s MQL5 → Experts, attach to the intended chart, set the inputs, switch on Algo Trading — and do all of it first on a demo account.
- The parameters are your decisions: size, stops, hours, magic number. Record them, change one at a time, and never mistake the author’s defaults for recommendations.
- Continuous running needs a continuously running terminal: your own machine for limited hours, a VPS (built-in virtual hosting or a third-party server) for around the clock — with the same EA never running twice on one account.
- Stopping is a procedure too: Algo Trading off, or remove the EA from the chart — and, unless the EA’s own shutdown code acts, its open trades remain open and become yours.
Next reads
- Choosing an EA: How to Read Backtests and Spot Exaggerated Claims (this batch, Article 3) — how to judge an EA before and while you run it.
- How to Open a Demo Account and Practise in Stages — the demo practice structure this article’s first runs follow.
- Forex Glossary for Beginners: The Terms Behind Every Article on This Blog — points versus pips, and the rest of the vocabulary the parameters use.
FAQ
Q: The EA is attached but never trades. What do I check first?
A: In order: the Algo Trading button is on; the EA’s Common settings permit algorithmic trading; the chart’s upper-right corner shows the EA’s name; and the Experts/Journal logs, which may identify why an EA cannot trade (a permission, an account restriction, an error message). Remember that silence can also be correct behaviour: the EA may simply be waiting for entry conditions that have not occurred yet, without logging anything.
Q: Can I run two EAs on the same account?
A: Yes, on separate charts. Each should use a different magic number, and each EA’s code must actually use its number to select the trades it manages — the number alone does not enforce the separation. Also check how your account’s position mode (netting or hedging) treats trades in the same symbol. And remember that their risks add up on the same account: two EAs each risking 2% per trade can lose together.
Q: Does a VPS make an EA profitable?
A: No. A VPS changes uptime, not the rules. When the hosting works as intended, it keeps a running EA running continuously, without your own computer — valuable for a method that must react at any hour, and harmful in exactly the same measure for a method that should not be running at all. Hosting, network and configuration failures remain possible either way.
Q: I removed the EA. Why are its trades still open?
A: Because removing the program and closing its trades are separate actions, as far as the platform is concerned. The EA managed those positions; with the EA gone, they remain open under any stop loss and take profit orders they already carry, until you close or manage them yourself. (If an EA’s documentation says it closes its trades when removed, that closing is the EA’s own shutdown code acting — check for it before you rely on either behaviour.)
Sources: MetaQuotes, MetaTrader 5 terminal help — installing and attaching Expert Advisors; the data folder and MQL5\Experts; EA inputs; algorithmic trading permissions; the virtual hosting service; removing an EA — checked 21 November 2026.
This article is information only and is not investment advice. Forex and CFD trading involves a substantial risk of loss, including the possibility of losing more than you deposited with some account types and jurisdictions. Practise on a demo account until every procedure in this batch is familiar. Make sure you fully understand how leveraged products work before you consider trading with real money.
Disclosure: Broker Cost Check is reader-supported. If you open an account through a partner link on this page and trade, Exness pays us a share of the revenue from your trading activity under its partner programme. You pay us nothing: our payment comes from Exness, out of that revenue. How we make money: How Broker Cost Check works — method and how we make money

Leave a Reply