Expert advisor (EA)
An automated trading program that runs on the MetaTrader 4 or 5 platform and can analyse prices, open, manage and close trades according to coded rules.
Expert advisor is MetaQuotes' name for an automated strategy on MetaTrader. EAs are written in MQL4 (for MT4) or MQL5 (for MT5). Other platforms have equivalents, such as cBots on cTrader.
What an EA can do
- Read price data and indicators, and apply rules ("if the 20-period moving average crosses above the 50, buy").
- Place, modify and close orders, including stops and trailing stops.
- Manage risk rules such as a maximum number of open trades.
An EA only runs while its platform is running and connected. Traders who want it to run around the clock often use a VPS, a remote server that stays online.
Backtests versus reality
MetaTrader includes a strategy tester for running an EA on historical data. Backtest results can be misleading:
- Overfitting: rules tuned to past data often fail on new data.
- Unrealistic costs: fixed spreads in testing versus variable spreads and slippage live.
- Data quality: poor tick data can make results look better than they would be.
Worked example
Illustratively, an EA shows a backtest with 300 trades and a smooth equity curve, assuming a fixed 0.5-pip spread. Its average gain per trade is 1.2 pips. If the real average spread plus slippage is 1.4 pips, the strategy loses money live despite the attractive test.
Practical note
Be very wary of EAs sold with promises of steady returns or "verified" results. Anyone with a genuinely reliable strategy has little reason to sell it cheaply. See expert advisors and trading bots, how to backtest a strategy and forex scam red flags.
Not investment advice. This is general information and education, written without knowledge of your circumstances. It is not a recommendation to buy or sell any instrument. Past performance is not a reliable indicator of future results. Trading leveraged products carries a high risk of losing money. Risk warning