Skip to content
ForexNations

Platforms

What is an Expert Advisor (EA) in MT4 and MT5, and is it safe?

Expert Advisors let MetaTrader trade by itself. They can be useful, but many sold online carry risks that do not show in their results until it is too late.

ForexNations Research Desk6 min read

if ema20 > ema50:buy(size=1%, stop=atr*1.5)

An Expert Advisor, or EA, is a program that trades inside MetaTrader 4 or MetaTrader 5. It reads prices, applies its rules and opens, manages and closes positions without you clicking anything. EAs are written in MetaTrader's own languages: MQL4 for MT4 and MQL5 for MT5.

What you need to run an EA

  • The EA file (.ex4 or .ex5), installed in the platform's Experts folder.
  • A terminal that stays on. An EA only trades while MetaTrader is running, so most people rent a VPS, a computer in a data centre that runs around the clock.
  • The right broker settings: symbol names, lot steps and trading hours must match what the EA expects.
  • Algo trading switched on in the platform, and the EA attached to the right chart.

Where EAs go wrong

Many EAs are sold online with impressive results. The common problems:

  • Martingale: the EA doubles the position after each loss. It wins small amounts most of the time and then loses a large part of the account in one run of losses.
  • Grid: the EA keeps adding positions as price moves against it, waiting for a return that may not come.
  • No stop-loss: losing trades stay open until the account runs out of margin.
  • Over-fitted backtests: rules tuned until the past looks perfect, which says little about the future. See how to backtest properly.
  • No support or updates: markets change, and an EA that is never maintained slowly stops fitting them.

Questions to ask before using an EA

  1. Does every trade have a stop-loss?
  2. Does it use martingale, grid or averaging down?
  3. Are there live results for more than a year, with the drawdowns shown?
  4. Who maintains it when the broker or the market changes?
  5. What is the most it has lost from a peak?

EA versus a managed algo service

Bought EAManaged algo service
Where it runsYour terminal or VPSThe provider's servers
Who maintains itUsually youThe provider's team
StrategiesOften oneSeveral per market
Your accountYour brokerYour broker
Your controlSettings in the EAInstruments, lot sizes, on and off

ForexNations works as a managed service: our strategies run on our servers and trade in your own MT4 or MT5 account, with a stop-loss on every order. See forex algo trading for how it works, and algo trading versus robo trading for the wider comparison.

This article is for educational purposes only and is not investment advice. Trading involves substantial risk of loss. Read our risk disclaimer.

← All insights