Automated Trading

What Is an Expert Advisor? The Plain-English MT5 Guide

March 16, 2026 9 min read Trading Paal
what is an expert advisor

⚡ Direct Answer

An Expert Advisor (EA) is an automated trading program written in MQL5 that runs on MetaTrader 5. It scans real-time market data, applies predefined algorithmic rules, and executes buy or sell orders automatically — without requiring the trader to be at the screen.

What Is an Expert Advisor in Forex and MT5?

An Expert Advisor in MetaTrader 5 is a software program that automates a complete trading strategy — from market analysis and signal generation through to order entry, stop-loss placement, take-profit management, and position exit. It replaces every manual action a trader performs at a chart with algorithmic instructions that execute in milliseconds.

The term ‘Expert Advisor’ is MetaQuotes’ official designation for automated trading programs on the MT4 and MT5 platforms. The broader industry uses 4 interchangeable names for the same tool: Expert Advisor, trading robot, forex robot, and automated trading system.

The programming language for all MT5 EAs is MQL5 (MetaQuotes Language 5) — an object-oriented language that provides direct access to market data, position management functions, technical indicator libraries, and account information.

⚡ Key Takeaway

An Expert Advisor is not a signal service and not a copy-trading tool. It is a self-contained program that lives inside MT5, reads the chart it is attached to, and acts according to its own coded logic — 24 hours a day, 5 days a week, including when the trader is offline.

How an Expert Advisor works inside MT5 5-stage automated execution loop 1 Market Data Price · Volume · Tick 2 EA Algorithm MQL5 Logic Rules 3 Signal BUY / SELL / HOLD 4 Order Execution Broker Server 5 Trade Manage SL · TP · Trail Continuous loop on every tick No emotion Fear and greed excluded Millisecond execution Faster than any manual click Active 24/5 All forex sessions covered
Figure 1: The 5-stage execution loop of a MetaTrader 5 Expert Advisor.

How Does an Expert Advisor Work in MetaTrader 5?

An Expert Advisor in MT5 operates by responding to platform events — primarily the arrival of new price ticks — and executing the coded strategy logic on each event. MetaTrader 5 triggers the EA’s OnTick() function every time the broker transmits a new bid/ask price update.

Market Scanning and Indicator Calculation

The EA reads live price data for the chart it is attached to, including the OHLC values of each candlestick across any timeframe the strategy requires. Built-in MT5 indicator functions — such as iMA() for moving averages, iRSI() for RSI, and iBands() for Bollinger Bands — calculate indicator values in real time.

Signal Generation and Order Execution

When the EA’s conditions evaluate to true — for example, when a 9-period EMA crosses above a 21-period EMA on the H1 XAUUSD chart — the EA calls MT5’s OrderSend() function to submit a market or pending order to the broker’s server with the instrument, lot size, direction, stop-loss, and take-profit as programmed.

24/5

Expert Advisors operate continuously across all forex market sessions. The gold (XAUUSD) market is accessible Sunday 23:00 UTC through Friday 22:00 UTC — 119 hours per week.

Trade Lifecycle Management

After an order is placed, the EA monitors the open position on every tick. Advanced EAs implement dynamic stop-loss trailing, partial position closure at defined profit levels, and time-based exits. The MT5 platform stores every EA action in the Experts tab of the Terminal window, creating a complete audit trail.

What Are the 5 Main Types of Expert Advisors Available on MT5?

The 5 main Expert Advisor types found on MetaTrader 5 are trend-following EAs, scalping EAs, grid/martingale EAs, news-event EAs, and hedging EAs. Each type implements a distinct market hypothesis and carries a different risk/reward profile.

5 Types of MT5 Expert Advisors Each implements a distinct market hypothesis 📈 Trend Following Trades dominant trendMA, ADX, MACD RISK LEVEL XAUUSD Ready Scalping EA High-frequency tradesSeconds per trade RISK LEVEL XAUUSD Ready Grid / Martingale Layered orders at fixedprice intervals RISK LEVEL High Risk on Gold 📰 News-Event EA NFP, FOMC, CPI eventsCaptures volatility spikes RISK LEVEL USD News Impact 🛡 Hedging EA Long and short positionsNeutralises direction risk RISK LEVEL Hedging Account
Figure 2: The 5 main types of Expert Advisors on MetaTrader 5.

What Is the Difference Between an Expert Advisor and a Trading Robot?

An Expert Advisor and a trading robot are identical in function. ‘Expert Advisor’ is MetaQuotes’ proprietary label; ‘trading robot’ is the informal industry equivalent. The functional distinction that matters is between fully automated EAs (no human input needed) and semi-automated EAs (signal generation only, trader confirms execution).

✅ TradingPaal Note

The Trading Paal EA is a fully automated XAUUSD scalping system that operates without requiring any trade confirmation. Read about the bot →

How Do You Install an Expert Advisor on MT5?

Installing an Expert Advisor on MetaTrader 5 requires copying the compiled .ex5 file into the platform’s MQL5/Experts data folder and attaching it to a chart. The full process consists of 6 steps and takes under 3 minutes on a correctly configured MT5 terminal.

1

Obtain the EA file. Download or purchase from the MQL5 Market. Compiled files use the .ex5 extension.

2

Open the MT5 data folder. In MT5 go to File then Open Data Folder. Locate MQL5 then Experts.

3

Copy the .ex5 file into the Experts folder. Navigate to MQL5 then Experts and paste the file — not Indicators or Scripts.

4

Refresh the Navigator panel. Right-click Expert Advisors in the Navigator (Ctrl+N) then select Refresh.

5

Attach the EA to a chart. Drag the EA from Navigator onto the chart. Confirm lot size, stop-loss, take-profit.

6

Enable automated trading. Click the Auto Trading button on the MT5 toolbar. Green smiley icon confirms the EA is active.

⚠️ Important

If the Auto Trading button is disabled, the EA runs analysis but submits no orders. Confirm it is enabled before expecting any trade activity.

What Are the 7 Core Benefits of Using an Expert Advisor in 2026?

The 7 documented benefits of Expert Advisors are: emotion elimination, 24/5 market monitoring, millisecond execution speed, multi-instrument scalability, strategy backtesting capability, consistency of rule application, and removal of fatigue errors.

Emotion elimination: EAs apply coded rules identically on every trade — fear, greed, and hesitation are absent.

24/5 market monitoring: Operates across all 4 forex sessions without requiring the trader at the terminal.

Millisecond execution: Orders submitted faster than any human click — critical for scalping XAUUSD gold.

Multi-instrument scalability: 1 trader can deploy across 10 different charts simultaneously inside MT5.

Strategy backtesting: The MT5 Strategy Tester provides 10+ years of historical price data for pre-live testing.

Rule consistency: Identical execution every time — no degradation under drawdown or psychological pressure.

Fatigue removal: Night sessions and high-volatility periods handled with equal precision at any hour.

What Are the 4 Key Risks of Expert Advisors Every Trader Needs to Know?

The 4 primary risks associated with Expert Advisors are: overfitting to historical data, broker execution dependency, failure to adapt to market regime changes, and unmonitored technical failures.

Overfitting risk: An EA backtested too heavily may fit past data only and fail on live accounts. Mitigate with out-of-sample testing.

Broker execution dependency: EA profitability depends on the broker spread, execution speed, and server uptime.

Market regime change: A trend-following EA calibrated in a bull market generates losses in prolonged sideways conditions.

Technical failure: EAs require a continuously running MT5 terminal. Use a verified VPS to eliminate power and internet outage risk.

⚠️ Risk Disclosure

Automated trading does not guarantee profit. All Expert Advisors carry the risk of partial or total capital loss. Learn about the 7 risks of automated forex trading

How Do You Backtest an Expert Advisor in the MT5 Strategy Tester?

Backtesting an Expert Advisor in MT5 involves running the EA against historical price data in the built-in Strategy Tester to evaluate its statistical performance before deploying on a live account. The Strategy Tester is accessible via View then Strategy Tester in MT5, or by pressing Ctrl+R.

Backtesting an Expert Advisor in MT5 5-step workflow using the built-in Strategy Tester 1 Select Your EA and Instrument Choose EA from dropdown — set Symbol to XAUUSD and Timeframe to H1 or M15 2 Configure Test Parameters Date range minimum 2 years — Every Tick model — set initial deposit amount 3 Run the Backtest Click Start — MT5 simulates EA logic tick by tick against historical data 4 Analyse the Report Net Profit — Max Drawdown target below 20% — Profit Factor target above 1.3 5 Optimise and Forward-Test MT5 Optimisation on out-of-sample data — forward-test on demo for 30 days minimum
Infographic: 5-step backtesting workflow in the MT5 Strategy Tester.

The 3 most important backtesting metrics for evaluating a gold EA are: Profit Factor (target 1.3 or above), Maximum Drawdown (target below 20% of account), and Win Rate (acceptable range: 40–65% for trend-following, 65–80% for scalping).

How Do You Choose the Right Expert Advisor for Your XAUUSD Strategy?

Choosing an Expert Advisor for gold trading requires evaluating 6 criteria: verified live account performance, transparency of the trading strategy, maximum drawdown within acceptable risk tolerance, broker compatibility, support for XAUUSD-specific parameters, and the developer’s update history.

Frequently Asked Questions About Expert Advisors

What is an Expert Advisor in forex trading?

An Expert Advisor (EA) is an automated program coded in MQL5 that runs on MetaTrader 5, scanning market conditions and executing trades based on predefined algorithmic rules without manual input from the trader.

What is the difference between an Expert Advisor and a trading robot?

Expert Advisor is MetaQuotes official term; trading robot is the informal industry equivalent. Both describe the same MQL5-coded program that executes trades automatically on MT5. The meaningful distinction is between fully automated EAs and semi-automated EAs that generate signals only.

Does an Expert Advisor trade automatically?

A fully automated Expert Advisor executes all trades automatically once the Auto Trading button is enabled in MT5. Semi-automated EAs generate signals but require manual confirmation at the execution stage.

Can Expert Advisors trade gold (XAUUSD) on MT5?

Expert Advisors on MT5 trade XAUUSD and any other instrument available on the platform. Gold-specific EAs are optimised for XAUUSDs spread range, session volatility patterns, and pip value.

How do you install an Expert Advisor on MT5?

Copy the .ex5 file into MQL5/Experts in the MT5 data folder, refresh the Navigator panel, drag the EA onto the target chart, then enable Auto Trading on the MT5 toolbar.

What programming language do Expert Advisors use?

Expert Advisors for MetaTrader 5 are written in MQL5 (MetaQuotes Language 5) — an object-oriented language developed by MetaQuotes that provides direct access to market data, trade functions, and indicator libraries through the MT5 terminal API.