The short version
An Expert Advisor, usually called an EA or a trading robot, is a small program that runs inside the MetaTrader terminal. It watches the price on the chart it is attached to, applies a fixed set of rules, and sends orders to your broker: open a trade, move a stop, close a position.
MetaTrader 5 EAs are written in a language called MQL5. The EA does not run on the broker's computer or on a website. It runs on your computer or on a rented server (a VPS) where your terminal is running, which has consequences for uptime that we cover in the VPS lesson.
What an EA actually does
- Reads data: the price, indicators and the state of your account.
- Checks its rules: for example, 'is there a setup, and is risk within limits?'
- Acts: places an order with a size and a stop, or manages an open trade.
- Repeats: every tick or every bar, for as long as the terminal is running and automated trading is switched on.
| An EA can | An EA cannot |
|---|---|
| Follow its rules every time, with no fear or greed | Know what it was not programmed to know, such as a surprise announcement |
| Watch the market around the clock the terminal runs | Keep working if your computer goes off, unless you use a server |
| Manage dozens of calculations at once | Guarantee a profit or avoid every loss |
| Be tested on past data before you risk money | Prove from a backtest alone that it will work live |
Things to check before you run any EA
- What market and account type is it built for? An EA made for one instrument, time frame or account currency can misbehave on another.
- How does it limit risk? Look for a stop on every trade and a rule for position size. Be wary of any robot that cannot explain this.
- Is there a live, verifiable track record? A backtest is a simulation. See backtest versus live results.
- Test on a demo account first. It costs nothing and finds setup problems before they cost money.
Frequently asked questions
Do I need programming skills to use an EA?
No. You install the file, attach it to a chart and set its inputs. Programming is only needed to write or change one.
Does an EA work when my computer is off?
No. The terminal has to be running and connected. Many people rent a VPS so the terminal runs all the time.
Are EAs allowed?
Most brokers allow them on MetaTrader 5, but check your broker's rules, especially about high-frequency styles.
Sources and method
- Standard risk-management and statistics formulas. Every example in this lesson uses made-up round numbers to show how the maths works; none of them is a result or a forecast.