Expert Advisors (EA) Explained: How MT4/MT5 Trading Robots Work
What an Expert Advisor is, how EAs run in MetaTrader 4 and 5, where to get them (Market, Code Base, Freelance), how to backtest, and why many EA sellers.
Reviewed by Hà Ngọc Lộc· Senior SEO Editor
Reviewed using our forex & CFD broker review methodology

An Expert Advisor (EA) is a program that trades for you inside MetaTrader. It reads prices, applies fixed rules and opens, changes or closes trades on its own. EAs are written in MQL4 (for MT4) or MQL5 (for MT5). They only run on the desktop terminal (or a VPS), not on the mobile or web versions. You can get them from the MetaTrader Market (paid or rented, with a free trial), the free MQL5 Code Base, or MQL5 Freelance for custom work. You can also build one with the MQL5 Wizard or MetaEditor. Test every EA in the Strategy Tester and on a demo account before using real money.
How an EA Runs
- Copy the EA file into File → Open Data Folder → MQL4/MQL5 → Experts (or install it from the Market).
- Restart the terminal and drag the EA onto a chart.
- Allow Algo Trading (MT5) or AutoTrading (MT4) and set the inputs: lot size, stop-loss and so on.
- Keep the terminal running. If your PC switches off, the EA stops. That's why traders use a VPS, and MetaQuotes sells one built into the platform.

Where EAs Come From
| Source | Cost | Notes |
|---|---|---|
| MetaTrader Market | Buy or rent | Free demo test before buying, according to MetaQuotes |
| MQL5 Code Base | Free | Source code you can read and modify |
| MQL5 Freelance | Paid custom job | A programmer builds your own rules |
| MQL5 Wizard / MetaEditor | Free | Build simple EAs yourself |
| Telegram / "robot" sellers | Often paid | Highest risk. Results are usually unverifiable |
Backtest Properly
- Use the Strategy Tester's real-tick or every tick mode on MT5.
- Include realistic spread, commission and swap.
- Test out-of-sample: optimise on one period, then check another.
- Then forward-test on demo for weeks before going live.
An EA tuned perfectly to past data ("curve fitting") usually fails on new data. Our EA trading strategy guide covers testing in more depth.
Broker Rules for EAs
Most brokers allow EAs, but check for minimum stop distances, limits on high-frequency trading, and how they handle latency arbitrage. Tickmill, Vantage and VT Markets all state that they allow EAs or scalping on their main accounts. Prop firms often have stricter EA rules than brokers.
"Forex Robot" Red Flags
- Backtests with no live, verified account
- Martingale or grid logic hidden behind "high win rate" claims (see martingale strategy)
- Sellers who require you to open an account with one particular broker
Related: What is MetaTrader? · MT4 vs MT5 · Forex signals
Official sources: MetaTrader 5 user guide (metatrader5.com) · MetaTrader 4 user guide (metatrader4.com).
Expert Advisors: Your Questions Answered
Do Expert Advisors work?
Some rule-based EAs work for a while under certain market conditions. None work all the time, and many sold online don't hold up in live trading.
Can I run an EA on the MT4 or MT5 mobile app?
No. EAs need the desktop terminal or a VPS.
Is an EA the same as a trading signal?
No. An EA runs rules in your own terminal. A signal is a trade idea from someone else.
Sources checked 2026-10-01: metatrader5.com "Automated Trading" (Market, Code Base, Freelance, MQL5 Wizard, Strategy Tester, VPS); broker account pages for Tickmill, Vantage, VT Markets.
Related Guides
Sources & verification
- Last checked
- Written by
- HNL Growth Team
- Reviewed by
- Hà Ngọc Lộc
- Length
- 2 min read · 571 words
Rules, prices and payout terms on this page were checked against the official websites, help-centre articles and published terms of the firms mentioned, on the date above. Prop firms and brokers change conditions often — confirm the current version on the official site before you buy or deposit. Read our broker review methodology and affiliate disclosure.
Official sources & documentation verified
- MetaTrader 5 user guide(metatrader5.com)
- MetaTrader 4 user guide(metatrader4.com)
Explore Related Hubs & Free Trading Tools
Ready to Trade with Vantage Markets?
Vantage Markets is a multi-regulated forex & CFD broker (FCA, ASIC, FSCA, CIMA, VFSC, FSC) trusted by 5 million+ traders, with Raw ECN pricing from $3/lot, no deposit/withdrawal fees, and full MT4/MT5/TradingView support.
Risk disclaimer: Vantage Markets is a live, regulated broker — trading forex and CFDs is done with real capital under normal market risk (this is not a simulated prop-firm evaluation). CFDs and leveraged forex products are complex instruments and carry a high risk of losing money rapidly due to leverage; most retail investor accounts lose money trading these products. Consider whether you understand how CFDs/forex work and whether you can afford the high risk of losing your money. Affiliate disclosure: HNL Growth earns a commission when you open a Vantage Markets account through links on this page.