GLOSSARY · METATRADER
What is an Expert Advisor (EA)?
An Expert Advisor (EA) is a program that runs inside MetaTrader 4 or 5 and trades for you: it reads prices, applies coded rules and places, changes or closes orders without anyone clicking. In forex, EA is the usual name for any MetaTrader trading robot.
Also called: EA · Forex EA · Expert Adviser · Trading robot · MT5 Expert Advisor · What is an Expert Advisor
How does an Expert Advisor work?
An EA is attached to a single chart and reacts to what happens there, above all the arrival of each new price tick. MetaQuotes describes trading robots as programs that "undertake price analysis based on preset algorithms, decision-making and, as a result, execution of trading operations in the market". An EA can read price history, indicators and the account, and it places orders without asking, which is what separates it from an indicator. One chart holds one EA: attaching a second unloads the first. The wider category, including bots that run outside MetaTrader, is covered in what an auto trading bot is.
What happens to an EA when MetaTrader closes?
It stops. An EA lives inside the terminal, so closing MetaTrader, losing the internet connection or a Windows update restarting the machine all halt it, and any position already open stays open with nobody watching it. MetaQuotes' own hosting page puts the requirement plainly: automated trading needs "constant connection to a trade server and uninterrupted power supply". That is the job a VPS does.
Why is my EA not trading?
Four things must all be true before an EA places a trade: the Algo Trading button on the toolbar is on (older versions, and parts of MetaQuotes' help, call it AutoTrading), the EA is allowed to trade in its own settings, the terminal is connected, and the chart is a symbol the EA was written for. On MT5 the EA's icon in the top-right corner of the chart is blue when it may trade and grey when it may not; the smiling and sad faces people search for belong to MT4. Start at EA not taking trades.
Expert Advisor, indicator or script?
MetaTrader runs three kinds of program, and they are easy to mix up. What separates them is whether they may trade: the MQL5 reference lists OrderSend and the other trading functions as prohibited in indicators.
| Program | When it runs | Can it trade? | Typical use |
|---|---|---|---|
| Expert Advisor | Continuously, on every new tick and other events | Yes | An automated strategy |
| Indicator | Continuously, recalculating as prices arrive | No, trading functions are blocked | RSI, moving averages, levels on a chart |
| Script | Once, then it unloads | Yes | A one-off job, such as closing every position |
How do you install an Expert Advisor in MT5?
- In MetaTrader 5, open File → Open Data Folder, then the MQL5 folder and the Experts folder inside it.
- Copy the EA file (.ex5) into Experts. An MT4 file (.ex4) will not run in MT5, and converting one needs the original source code. See MT4 vs MT5 EAs.
- Back in MetaTrader, refresh the Expert Advisors list in the Navigator, or restart the terminal.
- Drag the EA onto a chart of the symbol it was built for, or double-click it.
- In the window that opens, allow it to trade on the Common tab and set its inputs.
- Turn on the Algo Trading button in the toolbar. The EA's icon on the chart should turn blue.
How do you test an EA before trusting it with money?
MetaTrader 5 has a Strategy Tester built in, which MetaQuotes says "allows you to test and optimize trading strategies (Expert Advisors) before using them for live trading". Use its most realistic mode, every tick based on real ticks, which in MetaQuotes' words "provides conditions close to real ones". The faster modes rebuild the price path inside each bar, so on a strategy with a tight stop and target they can get wrong which of the two was hit first.
Then test on data the settings never saw. The tester's forward mode re-runs the EA on a separate period, which MetaQuotes says helps "avoid parameters fitting in certain areas of historical data". Parameters tuned until the past looks perfect are how most impressive backtests are made, and it is the standard we hold our own strategies to (how we test).
Where do Expert Advisors come from?
- Written yourself in MQL5, using MetaEditor, which comes with MetaTrader 5.
- Bought or rented on the MQL5 Market inside the terminal. See gold EAs on the MQL5 Market.
- Free downloads. Some are honest and some are bait for a broker sign-up. See free forex EAs for what to check first.
- Commissioned from a freelance MQL5 developer to your own rules.
Whatever the source, a seller's backtest is marketing until you can reproduce it in your own tester, on your own broker's prices.
Can you use an Expert Advisor in the US?
Automated trading is legal in the US. What limits American traders is access: the list of US-regulated brokers offering MetaTrader 5 is short, and many US traders run EAs through prop firm accounts instead. See MT5 brokers for US traders and prop firm trading bots.
What to check before paying for a gold EA is set out in how to choose a gold trading bot.
Common questions
What does EA mean in forex?
EA stands for Expert Advisor, MetaTrader's name for a trading robot: a program that analyses the market and places trades automatically inside MetaTrader 4 or 5.
Is an Expert Advisor the same as a trading bot?
An EA is one kind of trading bot: one that lives inside MetaTrader and is written in MQL4 or MQL5. "Trading bot" is the wider term, and also covers programs that trade through a broker's own connection or drive MetaTrader from outside, as ours does.
Do MT4 Expert Advisors work in MT5?
No. MT4 EAs are compiled to .ex4 files, which MetaTrader 5 cannot run, and the two languages are not compatible. Moving an EA to MT5 means rewriting it in MQL5 from the original source code.
Do I need a VPS to run an EA?
Only if it has to keep trading while your own computer is off, asleep or offline, which for most strategies is the point. An EA stops the moment the terminal stops.
Can an Expert Advisor lose money?
Yes. An EA follows its rules exactly, including rules that lose. It removes hesitation and missed entries, not risk; the strategy inside it decides whether it makes money.
How do I know my EA is running in MT5?
Look at the top-right corner of the chart. The EA's name and icon appear there: blue means it is allowed to trade, grey means algorithmic trading is off. The Experts tab of the Toolbox shows what it is doing.
Related terms
- MetaTrader 5MetaTrader 5 is the trading platform most retail forex and CFD brokers offer, and the environmen…
- Algo Trading buttonThe Algo Trading button in the MetaTrader toolbar is the global switch that permits Expert Advis…
- Magic numberA magic number is an integer an EA stamps onto every order it places, allowing it to identify it…
- VPSA VPS, or virtual private server, is a rented Windows machine in a data centre that stays on all…
- MQL5MQL5 is the C-like programming language used to write Expert Advisors, indicators and scripts fo…
- Strategy TesterThe Strategy Tester is MetaTrader's built-in backtesting and optimisation engine, which replays …
- MetaTrader 4MetaTrader 4 is the older MetaQuotes platform, still widely used for forex despite being superse…
- Algorithmic tradingAlgorithmic trading is executing trades according to predefined rules encoded in software, remov…
Further reading
Educational information only, not financial advice. Trading leveraged products carries substantial risk of loss. Last updated 2026-09-24.