Back to Trading Styles & Strategy Development

Trading Styles & Strategy Development · Intermediate · 4 min

What is an Expert Advisor?

You can explain what an Expert Advisor is, how it runs in MetaTrader 5, what it can and cannot do, and why bought EAs need the same scrutiny as any strategy.

Rules that trade themselves

Imagine your rules trading while you sleep: no hesitation, no skipped signals, no moved stops. For many traders, that is the dream of automation.

In MetaTrader, such a program is called an Expert Advisor. It is a powerful tool, and also one of the most heavily marketed products in retail trading. Understanding what it actually does makes it easier to use one well, and harder to be sold a bad one.

Tick, check, act

An expert advisor (EA) is a program that runs inside the MetaTrader trading platform and can analyze prices and place, change and close orders automatically. In MetaTrader 5, EAs are written in MQL5, MetaQuotes Language 5. The platform includes the language, the MetaEditor development environment and a strategy tester.

Steps How an Expert Advisor works: a new price tick arrives, the EA checks its rules, sends an order or does nothing, and manages any open trades. 1 New tick arrives 2 EA checks its rules 3 Sends or skips order 4 Manages open trades

An EA is attached to a chart. Each time a new price tick arrives, it runs its code: it checks its rules, sends an order or does nothing, and manages any open positions, for example by moving a trailing stop.

Two practical consequences:

Amplifies the rules

Comparison An Expert Advisor can follow rules exactly, watch the market all day, react in milliseconds and be backtested. It cannot see the future, fix weak rules, adapt by itself or remove market risk. An EA can Follow rules exactly Watch all day Reacts instantly Be backtested An EA cannot See the future Fix weak rules Adapt by itself Remove market risk

What automation adds is consistency and speed. An EA never hesitates after three losses, never skips a valid setup and never forgets to move a stop. It can watch many markets at once and be backtested exactly as it will trade.

What it cannot add is an edge. If the rules have a negative expectancy, the EA loses money with perfect discipline. It cannot foresee news, does not notice that the market has changed, and keeps trading through situations its rules were not written for.

That is also why bought EAs deserve deep suspicion. A perfect backtest can be overfit, and promises of steady monthly returns are a classic warning sign, as the scam lessons showed. Test any EA like a strategy of your own, starting on a demo account.

Common mistakes

The takeaway

An Expert Advisor is a program that trades fixed rules inside MetaTrader. It removes hesitation, not risk, and it is only as good as its rules.

Check yourself

Quick quiz

4 questions. Instant feedback, nothing is saved.

  1. 1Tap the card that lists what automation cannot do.

    Tap the chart.

    Comparison Chart for the question: Tap the card that lists what automation cannot do. An EA can Follow rules exactly Watch all day Reacts instantly Be backtested An EA cannot See the future Fix weak rules Adapt by itself Remove market risk

    An EA executes rules faithfully, including bad ones. It does not create an edge.

  2. 2In which language are Expert Advisors for MetaTrader 5 written?

    MetaTrader 5 includes the MQL5 language, the MetaEditor development environment and the strategy tester.

  3. 3What happens to an EA running on your laptop when the laptop is switched off?

    An EA runs inside the MetaTrader terminal. Traders who need it around the clock use a hosted or virtual server.

  4. 4A seller shows a perfect EA backtest and promises monthly returns. What is the right response?

    Backtests can be overfit or invented. Promised returns are a classic sign of fraud.

of 4 correct.

Sources

Back to Trading Styles & Strategy Development