MQL5 & MetaTrader core
What an Expert Advisor is
3 min
An Expert Advisor (EA) is an automated trading program that runs inside MetaTrader. Once attached to a chart, it can analyse price and place, modify and close orders without human intervention.
EAs versus the other program types
MetaTrader runs three kinds of MQL5 program — knowing the difference avoids confusion:
- Expert Advisor — can trade automatically. Driven by incoming price ticks. This is what we build.
- Indicator — only calculates and draws values on the chart (a moving average, an oscillator). It cannot place orders.
- Script — runs once to perform a single action, then exits. No ongoing trading loop.
What an EA is good and bad at
An EA executes a defined rule set tirelessly and without emotion — no fear, no greed, no missed sessions, no fat-finger entries. That discipline is its great advantage.
Its weakness is that it does exactly what you coded — including your bugs and your bad assumptions. An EA cannot notice that the market regime has changed, that a news event makes today different, or that your logic has an edge case at the year boundary. It will follow a flawed rule straight into a loss, fast.
The responsibility this creates
Because an EA can place real orders automatically, a coding error can lose money in seconds. This is precisely why the testing discipline in this track is not optional. You never run untested code on a live account — and even tested code goes through demo and small-size live first, as the final chapter covers.
This content is for educational and informational purposes only and is not investment, financial, tax or legal advice. Trading and investing carry risk, including the possible loss of capital. Any performance shown by third-party tools is hypothetical and not a promise of future results. Do your own research and consider professional advice before making any decision.