What expert advisor (EA) means
An expert advisor, usually shortened to EA, is a program that trades automatically on a MetaTrader platform. It watches the market, applies the rules written into it and can open, modify and close orders without you clicking anything. EAs are written in MQL, the scripting language of MetaTrader 4 (MQL4) and MetaTrader 5 (MQL5), and they run inside the trading terminal attached to a chart.
The name is slightly misleading. An EA does not advise you in the sense of giving opinions. It executes a fixed set of instructions, and what it does depends entirely on how it was coded and configured. Some EAs are very simple, for example placing a pending order at the start of a trading session. Others manage several positions, scale in and out, and adjust risk according to account size.
Users range from retail traders who want to remove emotion and repetition from a rule-based method, to developers who build and test systems, to people who buy or rent ready-made EAs from marketplaces. Understanding what an EA can and cannot do is important because the label attracts a lot of exaggerated marketing.
How it works
An EA is attached to a chart for a given symbol and timeframe. The terminal then calls its code each time a new price tick arrives, a bar opens, or a timer fires. The code evaluates conditions, such as an indicator value, the time of day or the number of open trades, and sends trade requests to the broker's server.
The usual building blocks are:
- Inputs: parameters you can change, such as lot size, stop-loss distance and indicator periods.
- Signal logic: the rule that decides when to enter or exit.
- Order management: placing orders, setting stop-loss and take-profit, trailing stops, closing positions.
- Risk controls: maximum open trades, maximum spread allowed, daily loss limit.
- Identification: a magic number, so the EA can tell its own orders from manual ones.
Two practical requirements follow. The terminal must stay connected and running, which is why many users rent a virtual private server (VPS). And the EA is bound by the same execution conditions as any order: spreads, slippage, requotes and platform rules still apply.
MetaTrader includes a strategy tester that replays historical data, so you can see how the rules would have behaved. It also supports optimization, where the tester tries many input combinations.
A worked example
These numbers are illustrative. Imagine a USD-denominated account of 10,000 USD and a simple EA that buys EUR/USD when a 20-period moving average crosses above a 50-period one, with a stop-loss 40 pips away. This is a description of how an EA is configured, not a recommendation to trade that rule.
- Risk per trade chosen by the user: 1% of 10,000 = 100 USD.
- Stop distance: 40 pips.
- Pip value for 1 standard lot of EUR/USD: about 10 USD per pip.
- Loss per lot if stopped out: 40 x 10 = 400 USD.
- Position size: 100 / 400 = 0.25 lots.
The EA can calculate this each time. Now backtest results: suppose the tester reports 400 trades over five years, 45% winners, and an average winner of 60 USD against an average loser of 40 USD. Expectancy per trade is 0.45 x 60 - 0.55 x 40 = 27 - 22 = 5 USD. That looks positive, but if live spreads are 0.5 pips wider than in the test, the cost per trade can eat much of that 5 USD. A small edge in a test can disappear in live conditions.
Why it matters
Automation brings consistency: an EA follows its rules at three in the morning and after a string of losses. It can monitor many markets at once and react in milliseconds, which a person cannot do reliably.
But automation also scales mistakes. A bug, a wrong lot size or a rule that no longer fits the market can lose money repeatedly and fast. Costs matter even more for EAs that trade often, since the spread, commission and swap are paid on every trade. Execution model, server location and platform stability all influence results. Some brokers restrict certain EA behaviors, such as very high-frequency scalping, hedging or news trading, and rules vary by account type.
How to use it in practice
- Read the code or documentation, or at least understand the rule in plain language, before running any EA.
- Test on a demo account first, then with a very small live size.
- Use realistic spreads, commissions and slippage in backtests. Check the quality of the historical data used.
- Check the broker's terms for restrictions on automated trading.
- Set hard limits: maximum lot size, maximum open trades, maximum daily loss.
- Plan hosting. A VPS reduces the risk of disconnection, but you still need monitoring.
- Review results periodically and stop the EA if live behavior departs from what the test suggested.
Common mistakes and misconceptions
- Trusting a flawless backtest. Curve fitting, where inputs are tuned until the past looks great, usually fails on new data. Test on a period the optimization never saw.
- Buying an EA because of marketing screenshots. Verified live statements over a long period are more informative than a sales page.
- Believing an EA removes risk. It only executes rules; the rules can still lose.
- Ignoring costs. A strategy with tiny gains per trade can be wiped out by a wider spread.
- Running martingale or grid systems without understanding the tail risk. They can show long winning streaks followed by one large loss.
- Forgetting the platform. Terminal updates, broker server changes or lost connection can break an EA.
Risks and limitations
EAs trade leveraged products such as forex and CFDs, which carry a high risk of rapid loss. Past test results do not predict future results. Market conditions change, and an approach that suited one regime may fail in another. Technical failures, disconnections and execution differences between demo and live accounts are real. Where an EA is sold as a product, regulations on promotions differ by country, and unregulated sellers are not covered by any compensation scheme.
How Brokeli looks at it
For broker research, an EA matters because of what the broker allows and how it executes. We look at whether MetaTrader access exists, whether automated trading is permitted, the execution model and the published spread and commission schedules. These are recorded from published research snapshots by country and account type. We do not rate or endorse individual EAs.
Frequently asked questions
What is an expert advisor in MetaTrader?
It is a program written in MQL4 or MQL5 that attaches to a chart and trades automatically using preset rules. It can open, modify and close orders, manage risk and run around the clock while the terminal is connected, but it only does what its code and settings tell it to.
Do expert advisors make guaranteed profits?
No. An EA is only as good as its rules, and markets change. Backtests can look strong because inputs were tuned to the past. Live results are affected by spreads, slippage and execution. Anyone promising certain profits from an EA should be treated with caution.
Do I need a VPS to run an EA?
Not strictly, but the terminal has to stay open and connected for the EA to work. A VPS is a remote computer that runs 24 hours, which reduces the chance of missed trades from a power cut or lost home connection. It adds a small monthly cost.
Can I test an EA before using real money?
Yes. MetaTrader has a strategy tester for historical simulation, and most brokers offer demo accounts for forward testing in live market conditions. Use realistic costs, and remember a demo account does not reproduce every real-world execution effect.
Do all brokers allow expert advisors?
No. Many brokers on MetaTrader allow them, but some limit certain styles such as very frequent scalping, hedging or trading around news. Platform availability also differs by country and account type, so check the broker's terms and conditions before relying on an EA.