All guides · Trading bots

Expert Advisor (EA)

What an Expert Advisor is, how a trading bot runs inside MetaTrader, and what to check before you trust one with money.

What it is

An Expert Advisor (EA) is a trading bot that runs inside MetaTrader 4 or MetaTrader 5. It reads prices as they come in, decides when to buy or sell according to fixed rules, and places and manages the orders on your broker account for you. EAs are written in MetaTrader's own languages: MQL4 for MT4 and MQL5 for MT5.

Why it matters

A bot follows its rules every time: no hesitation, no revenge trades, no missed signals while you sleep. Because the rules are fixed, you can also test them on years of past prices before risking money. The flip side is that a bot does exactly what it was written to do, mistakes included, so you need to understand and test it.

Good to know

Get an EA (build it, buy it, or have it written), read what it does, backtest it in the Strategy Tester, run it on a demo account for a few weeks, and only then try it live with small risk. Keep an eye on it: markets change, and an edge that worked for years can fade.

Example

A gold EA might buy at the start of the day after three down days in a row, put a stop loss below the recent low, and take profit when the trade gains what it risked, all without you touching the chart.

Common mistakes

Buying a robot that promises guaranteed profits; running bots that use martingale or grid strategies (doubling down after losses); skipping the demo test; and running a bot without knowing how much one losing trade costs.

Related

Related markets