How to Backtest an EA in MT5: A Repeatable Workflow

How to Backtest an EA in MT5: A Repeatable Workflow

A useful MT5 backtest is a repeatable experiment: an identified EA build, saved inputs, a stated symbol and date range, and recorded execution assumptions. Start with one fixed configuration before trying to improve its result.

Define the question first

“Does this build start and place the expected type of order?” and “How sensitive is this strategy to costs?” need different tests. Write one question at the top of your record. Do not quietly change it after seeing the outcome.

For an initial software check, use a manageable period and inspect individual events. For a performance study, plan broader periods and assumptions before running it. Neither exercise makes future returns predictable.

Set up a single run

Open Strategy Tester, select the EA, symbol, timeframe, dates and account assumptions, then load the intended inputs. Keep optimization off for the baseline. MetaTrader's testing guide documents these controls, saved settings and visual testing.

Minimum experiment record
RecordWhy it matters
Source release and EX5A later edit may behave differently.
Broker, server and exact symbolA suffix can identify a different contract.
Dates, timeframe and tick modeThey define what was simulated.
Deposit, currency and leverageThey affect sizing and margin assumptions.
Inputs, costs and delayThey are part of the experiment, not incidental details.

Choose a tick mode deliberately

Real-tick mode uses broker tick history where available. Missing tick history may still require generated ticks. Coarser modes change the price events seen by the EA. The official tick-mode reference explains these differences.

If entries, stops or trailing logic depend on movements inside a candle, a test that only checks coarse price points can answer the wrong question. Record the mode in the report instead of treating a smooth chart as proof of realistic execution.

Review events before the total profit

Choose a few entries and follow each through to its exit. Compare the time, direction, volume and protection with the documented rules. Then look for initialization failures, rejected requests and gaps in the tester log.

Suppose you expected one entry after a completed hourly candle but observe three orders in the same minute. Investigate the rule and position state before changing the lot size. Raising or lowering volume would only obscure the behavior you intended to check.

Save the result and choose the next experiment

Keep the report, settings and log together. Write what the run established and what it did not. An appropriate conclusion could be “the selected build completed this period with these inputs”; “ready for all live conditions” is not supported by that observation.

Next, change one assumption at a time, such as the test period or cost scenario, and compare. Use the report-reading guide to interpret the output and the forward-testing guide before tuning parameters. Historical checks should be followed by demo observation before considering live trading.

Back to top

MQLume Bespoke

Built around your ambition.

Explore bespoke services →

Have something more specific in mind?

Ask us about advanced custom development. Share your requirements through private support or email; we will discuss the scope and quote separately.

100% committed to following up on your delivery and support requests.

Free downloads. Real source files.

FREE

Lizard [MQLume]

MQL5 / MT5Version v2.21

Free editable gold breakout project with six independently selectable cores, session filters and flexible position sizing.

US$149.00FREE
FREE

Scraper Gold [MQLume]

MQL5 / MT5Version v3.80

Free editable source with compiled EX5: four gold breakout engines with independent profiles, sizing, direction and exits.

US$95.00FREE
FREE

EA Black Dragon [MQLume]

MQL5 / MT5Version v13.0

Trend-based entries with optional grid additions, side controls and virtual exits.

US$30.00FREE
FREE

Hamster Scalping [MQLume]

MQL5 / MT5Version v21.0

RSI entries with two ATR filters, configurable sessions and optional grid management.

US$30.00FREE
MQLume

More to explore. A community to share it with.

Stay close to MQLume, wherever you like to learn.

YouTube

See our EAs in action. Explore backtests, walkthroughs and practical guides.

Watch on YouTube

Telegram

Meet other EA users, share ideas and keep up with what’s new.

Join the community Follow official updates

Cart

One personal-use licence per project. Each project can be added once.

Your cart is waiting for its first passenger.

Choose an EA or source edition to get started.

Continue shopping