Guide · MetaTrader

What an Expert Advisor (EA) is

An Expert Advisor is a program that trades on its own inside MetaTrader. It follows rules written in code: when to open, with what lot size, where to place the stop, when to close.

How it works

You drag it onto a chart. Every time a new price arrives, it checks its conditions; if they're met, it sends the order.

It needs the terminal open, with the “Algo Trading” button switched on.

EA, indicator or script

  • An EA trades: it opens or closes positions.
  • An indicator only draws or calculates; it doesn't send orders.
  • A script runs once, then it's done.

Where it comes from

  • You code it in MQL5 or MQL4.
  • A tool such as StrategyQuant X generates it. What it is.
  • You buy it ready-made, on the MetaTrader Market or from a third party.

What identifies it

Each EA tags its trades with a magic number, as well as a comment. That's how you know which robot opened each one when there are several on the account. The magic number.

Robot or manual trading

The robot doesn't skip its rules or trade on impulse. The trade-off: it doesn't see what lies outside its code: a news release, a holiday, new broker conditions.

Algorithmic or quantitative trading

Algorithmic means trading with automated rules. Quantitative means deciding those rules with statistics. An EA can be both, or only the first.

What's inside

  • The entry signal: the conditions for opening.
  • Risk management: the lot size, the stop.
  • The exit: take profit, trailing stop or time-based close.
  • The filters: trading hours, maximum spread, days off.
  • The inputs: the values you can change without touching the code.

How to install it

You copy the file (.ex5 in MetaTrader 5, .ex4 in the previous version) into the “Experts” folder. You restart the terminal or refresh the Navigator. Then you attach it to the chart of the symbol it trades.

Before leaving it on its own

  • Run it through the Strategy Tester. Backtesting in MetaTrader 5.
  • Leave it on demo for a few weeks.
  • Check that the lot size comes out as you expect.
  • Write down its magic number, as well as the comment.

Common mistakes

  • Leaving it on a PC that gets switched off. Do you need a VPS?
  • Running two EAs with the same magic number.
  • Not checking the “Experts” tab when it stops trading. What to check.

Frequently asked questions

What is an Expert Advisor in trading?

A program that trades on its own inside MetaTrader, following rules written in code. It's also called an EA, a trading robot or a trading bot.

What is the difference between an EA and an indicator?

The EA sends orders: it opens or closes trades. The indicator only calculates or draws on the chart.

Does an Expert Advisor work when my computer is off?

No. It needs the MetaTrader terminal to be open. That's why many traders install EAs on a VPS, a remote computer that never shuts down.

Put your robots in orbit.

Try it free

Sign up in a minute, no card required.