On this page
The short version
- An Expert Advisor executes coded rules automatically in MetaTrader — it removes emotion but has no judgment beyond its code.
- The EA only acts while the terminal runs and connected, which is why serious users run one on a VPS.
- Backtests use generated ticks and simulated spreads, so live results commonly differ from the historical curve.
- Test on fine tick modes, then demo-forward across sessions before risking live money at small size.
- Guaranteed-return robot marketing is a fraud red flag: the CFTC cites the Mirror Trading International case, with over $1.7 billion stolen from at least 23,000 people.
An Expert Advisor (EA) is a program that trades a live or demo account for you: it watches prices on a chart, applies the rules you or its author have coded, and sends orders to the broker without waiting for a human to click. In MetaTrader 4 and MetaTrader 5, most retail automation works exactly this way, and the promise is easy to understand — a robot that never sleeps, never panics, and never revenge-trades. The reality is narrower: an EA does precisely what its code says, nothing more, and its usefulness depends entirely on whether those rules had any real edge to begin with. This article explains what an EA actually does, how it runs on your account, why backtests so often look better than live results, and the red flags to check before you attach anyone else's robot to your money.
What an Expert Advisor actually is
An Expert Advisor is a program written in MQL (MQL4 for MetaTrader 4, MQL5 for MetaTrader 5) that attaches to a chart inside the trading terminal. Unlike an indicator, which only draws on the chart, an EA is allowed to send trade instructions: open positions, close them, modify stop-loss and take-profit levels, and manage position size.
The MetaQuotes documentation describes the runtime model plainly: each script, service and Expert Advisor runs in its own separate thread, and indicators on the same symbol work in a shared one (MQL5 Reference, "Program Running"). An EA is event-driven — its main logic typically fires on the OnTick event, i.e. every time the terminal receives a price change. There are also events for timer ticks, chart changes and trade events, which is how EAs manage positions between ticks.
Two practical consequences follow from that design:
The EA has no independent judgment. If the code says "buy when the fast moving average crosses above the slow one," it will buy in every market condition, including the ones where that rule loses money. There is no discretionary override unless the author built one.
The EA only acts on what the terminal can see. It does not know about news that has not ticked the price yet, your broader financial situation, or anything outside the data and functions it is given. Marketing that implies a robot "knows" where the market is going is describing something no retail EA can do.
What an EA can and cannot automate
Almost everything mechanical in a trading plan can be automated: entries on signals, stop-loss placement, take-profit and trailing stops, partial closes, time filters ("only trade the London session"), and position sizing from an account-balance formula. Automation is genuinely good at the tasks humans do badly — applying the same rule consistently, executing in milliseconds, staying awake across all sessions, and taking the emotion out of individual trades.
What it cannot automate is the hard part: knowing whether the strategy itself is profitable going forward. An EA removes hesitation and fear, which is real value, but it also removes the pause where a human might notice something is wrong — the broker's server clock is off, the spread has widened abnormally, or the instrument is gapping after a weekend. Because the robot keeps operating through those conditions, errors and losses can accumulate faster than they would under a cautious human. Automation multiplies execution discipline; it does not create profitability.
How an EA runs in practice
When you attach an EA to a chart and enable "Algo Trading" in the terminal, the program loads into its own thread and waits for events. A few operational facts matter for anyone running one:
The terminal must be running. Your EA only acts while MetaTrader is open and connected to the broker's server — on your laptop, that means the laptop stays on. This is why many EA traders rent a virtual private server (VPS) so the terminal can run continuously without keeping a home computer awake.
One EA per chart is the normal pattern. A strategy built for EUR/USD on H1 attaches to that chart; running the same EA on several charts usually means several independent instances, which can double-count position limits unless the code guards against it.
Platform features can be restricted in some contexts. Functions that reach the outside world — web requests, notifications, alerts — are useful live but are deliberately not executed in the Strategy Tester during optimization, because they would slow the test down and can't be meaningfully "tested" (MQL5 Reference, "Testing Trading Strategies").
Understanding this helps you read product claims. An EA that "ran profitably for 10 years" on the seller's site has, at best, run through the seller's own historical data on their settings — you have not seen its behavior on your broker's feed, spread, and execution.
Why backtests and live results diverge
Backtesting a strategy means replaying historical data through its rules and measuring the hypothetical result. MetaTrader's Strategy Tester is the standard tool, and it is genuinely rigorous about some things — but its documentation is explicit about where realism is limited, and those limits explain most backtest-versus-live disappointments.
Tick data is often generated, not real. The tester supports several tick-generation modes: "Every tick," "1 minute OHLC," and "Open prices only." In the basic "Every tick" mode, the tester constructs a detailed tick sequence from minute bars transferred from the trading server; the other two modes are simplifications of it. Where "real ticks" are available from the broker they can be used, but historically most backtests have run on generated ticks. An EA whose rules are sensitive to intra-minute price movement (tight take-profits, scalping logic) will behave differently on generated ticks than it would on the actual tick stream.
Spreads in a backtest are simulated. Historical minute data does not carry a full record of the spread at every moment, so the tester has to model it. Live spreads widen around news, at session opens, and on low liquidity — exactly the conditions where an automated strategy may be stopped out or slipped. A backtest with an idealized spread flatters any strategy that trades frequently.
The market never replays. Even a perfectly simulated backtest answers a historical question: "what would these rules have done on this data?" It cannot answer whether the pattern persists. This is why the classic failure mode is over-fitting — tuning parameters until the equity curve on the backtest looks smooth, on data chosen because the strategy already worked there. A curve fitted to the past is not evidence about the future.
Practical checklist for testing an EA honestly:
Backtest on the finest tick mode available, and if the broker provides real tick history, use it.
Note what spread the tester assumes; compare it with the spread you actually see at the hours the EA trades.
Run the EA on a demo account for weeks across different sessions and news events before any live money.
Start live at a small size and treat the first weeks as an extension of the test, not the harvest.
Be suspicious of any result that required specific parameter settings to look good — vary the parameters and see whether performance collapses.
None of this guarantees a profitable strategy; it only removes some of the ways a bad one can hide.
Buying or subscribing to an EA: the red flags
A large market sells robots, signals, and "copy this bot" services. The platform marketplaces (like the MQL5 Market) at least route purchases through a vendor identity and user reviews, but much is sold directly through websites, social media, and messaging apps, where claims are essentially unverified.
The strongest single signal is a promise of returns. The U.S. Commodity Futures Trading Commission (CFTC) addresses this directly in its customer advisory on automated trading schemes, noting that fraudsters tout trading algorithms that "promise unreasonably high or guaranteed returns," and that the technology "can't predict the future or sudden market changes" (CFTC, "AI Won't Turn Trading Bots into Money Machines"). The advisory's case study is a warning about how large this can get: over roughly three years, Mirror Trading International's operator stole more than $1.7 billion in bitcoin from at least 23,000 people, selling access to a proprietary bot that "guaranteed" at least a 10 percent monthly return trading foreign currencies.
Other checks worth doing before paying for any robot:
Ask what evidence exists outside the seller's own screenshots. A verified track record from a third party, a real account history you can audit, or a marketplace listing with independent reviews — versus an equity curve with no source.
Ask what happens when it loses. A strategy description that only covers wins is incomplete. A real rules-based system can state when it is wrong and how it limits the loss.
Check jurisdiction and registration. In the United States, forex and derivatives sellers generally must be registered with the CFTC or NFA, and the CFTC's forex fraud advisory lists classic red flags: promises there is no "bear market," pressure to move money quickly, and difficulty getting background information about the seller (CFTC, "Foreign Currency (Forex) Fraud").
Assume the demo performance shown to you is the best case. If a seller shows you one perfect month, you are seeing their choice, not a sample.
Is automating right for you?
An EA is a tool for executing a defined strategy consistently. If you already have a written strategy with explicit entry, exit and sizing rules — and the patience to test it properly across demo and small live accounts — automation can remove the emotional mistakes that typically erode a working plan. If you do not yet have a strategy, an EA will not provide one; it will simply execute whatever rules its author chose, at machine speed, including the losses. And if what you actually want is exposure to "a smart robot that makes money," that product does not exist at retail — only strategies with varying, uncertain edges, and sellers whose claims deserve the skepticism described above.
No EA, no matter how it is marketed, removes trading risk. Position sizing, monitoring, and accepting that losses are part of the plan remain your job, robot or not.
Sources & further reading
Check the original source for its scope, publication date and latest terms.
- MQL5 Reference — Program Runninghttps://www.mql5.com/en/docs/runtime/running
- MQL5 Reference — Testing Trading Strategieshttps://www.mql5.com/en/docs/runtime/testing
- CFTC Customer Advisory: AI Won't Turn Trading Bots into Money Machineshttps://www.cftc.gov/LearnAndProtect/AdvisoriesAndArticles/SITradingBots.html
- CFTC Fraud Advisory: Foreign Currency (Forex) Fraudhttps://www.cftc.gov/LearnAndProtect/AdvisoriesAndArticles/fraudadv_forex.html
For education and research, not personal investment advice. Trading involves risk. Broker terms and protections depend on your country, account and contracting legal entity.



