What Is an MT5 EA? How It Works and How to Choose One
Contents
Bottom Line: An MT5 EA Is a Rule Set That MT5 Executes for You
An MT5 EA (Expert Advisor) is a program written in the MQL5 language that runs inside the MetaTrader 5 terminal. It reads prices, decides according to fixed rules whether to open or close a position, and sends the orders itself. Once it is attached to a chart and automated trading is switched on, no manual clicks are needed.
The conclusion first: an EA does not make a losing idea profitable. It only executes an idea consistently. Whether that is good or bad depends entirely on the rules inside it, which is why most of this guide is about how to check those rules before trusting an EA with money.
How an MT5 EA Works
It reacts to every price update
An EA's main logic runs each time a new price (tick) arrives for the chart's symbol. On each tick it can check indicators, spread, time of day and open positions, then decide whether to act. Some EAs only act once per new bar, which makes their behaviour easier to reproduce in a backtest.
It runs only while the terminal runs
An EA lives inside your MT5 terminal. If the PC sleeps, loses its internet connection or MT5 is closed, the EA stops managing its trades. This is why most people who run an EA continuously use a VPS (a remote server that stays on 24 hours a day). See How to Choose a VPS for EA Trading.
MT5 EAs and MT4 EAs are different files
MT5 EAs are .ex5 (compiled) or .mq5 (source code) files. MT4 EAs are .ex4 / .mq4 and do not run on MT5, and the reverse is also true. When you download an EA, check that it is the MT5 version.
What You Need to Run an MT5 EA
- An MT5 trading account with a broker that allows automated trading.
- The MT5 terminal (desktop version; the mobile apps cannot run EAs).
- The EA file, placed in the
MQL5/Expertsfolder (open it from File → Open Data Folder). - Algo Trading switched on in the toolbar, and "Allow Algo Trading" ticked in the EA's settings.
- A VPS if the EA must run while your own PC is off.
The full step-by-step procedure, including compiling and the settings tabs, is in Complete Guide to Installing and Configuring an EA in MT5. If the EA is attached but does nothing, start with MT5 AutoTrading Disabled (10027): How to Fix It.
What an MT5 EA Can and Cannot Do
| An EA can | An EA cannot |
|---|---|
| Follow its rules without hesitation or fatigue | Adapt to market conditions its rules never considered |
| Watch the market 24 hours a day (on a VPS) | Guarantee a profit, whatever its backtest shows |
| Apply the same lot size and stop-loss every time | Protect you if the lot size you set is too large for your balance |
| Be tested on years of past data before going live | Know about news or events unless its rules include them |
The most common disappointment comes from the right-hand column: an EA that looked excellent on past data and then behaved differently on a live account. That gap is what the checks below are for.
How to Choose an MT5 EA: Five Checks
1. Read the backtest report, not just the profit curve
Look at the number of trades, the profit factor and above all the maximum drawdown. A smooth curve built from a few dozen trades says little. MT5 Backtest Report Guide explains each figure.
2. Check how the backtest was modelled
In the MT5 Strategy Tester, "Every tick based on real ticks" uses recorded tick data and is the most realistic mode. Results from "Open prices only" or generated ticks can look much better than reality for EAs that trade often or use tight stops. See Real Ticks vs OHLC.
3. Look for results after the backtest period
A forward test, meaning the EA running on an account after it was built, is the closest you can get to live behaviour without risking your own money. An EA tuned so tightly to past data that it only works there is called curve-fitted; a forward record is the simplest way to catch it. On this site, the results of our EAs running on demo forward accounts are published on the forward test page.
4. Understand the strategy type and its worst case
Grid and martingale EAs often show high win rates until one long trend wipes out months of gains. Trend-following EAs lose more often but in small amounts. Know which type you are running and what its bad periods look like: Martingale EA Risks.
5. Size the lot for the drawdown, not for the profit
Before going live, ask: if this EA repeated its worst backtest drawdown on my account, could I keep running it? If not, lower the lot. Risk management basics covers how to work this out.
Free and Paid MT5 EAs
MT5 EAs are available from developer websites, from the official MQL5 Market, and sometimes from brokers. Price alone tells you little about quality; the five checks above apply equally to a free EA and a paid one.
On this site, our EAs can be downloaded free by opening a live MT5 account through our referral link at HFM, XM or Exness and registering that account number on the EA page. Demo accounts cannot be used to activate the free versions. Several of the same EAs are also sold on the MQL5 Market. For a step-by-step start with free EAs, see Getting Started with MT5 Free EAs.
Summary
- An MT5 EA is an MQL5 program that trades automatically inside MetaTrader 5, only while the terminal is running.
- It executes rules consistently but cannot fix weak rules or protect an oversized lot.
- Before going live, check the drawdown, the backtest modelling, forward results, the strategy type and your lot size.
To compare EAs by these figures, see the EA ranking.
Related Pages
Related
2026-10-11
Low Expected Payoff EAs: Profit Buried by Costs
2026-10-02
What Is a Realistic Monthly Return Target for EA Trading?
2026-07-27
Why You Must Check an EA's Max Consecutive Losses First
2026-07-26
What an EA's average holding time reveals
📧 MQL5 Market price-rise alerts + free 5-day email course
Our EAs are free on this site with a live account at a partner broker. The versions sold on the MQL5 Market are at launch pricing and step up as copies sell. Get notified before each rise, plus a daily email on algo-trading essentials, reading backtests correctly, and choosing a broker.
* Privacy strictly protected. You can unsubscribe at any time.
Have a question about EAs or FX?
You can post it on the Nattzy trading forum (free sign-up). Questions beyond this article are welcome too — EA settings, choosing a broker and more.
Ask on Nattzy ↗