How to Backtest a Strategy in MT5 (Advanced Guide)
MT5 backtesting explained step by step: Strategy Tester settings, real tick models, modelling quality, optimization and forward testing you can trust in 2026.

By Marcel Hambálek · Senior Trader, For Traders
MT5 backtesting is the process of running a trading strategy or Expert Advisor against historical price data in MetaTrader 5's Strategy Tester (Ctrl+R), which replays past ticks, spreads and orders to simulate how the strategy would have performed. Its accuracy depends entirely on the tick model, history quality and cost assumptions you feed it.
Key takeaways
- The Strategy Tester is desktop-only — the MT5 web terminal and mobile apps do not include it, so browser and phone users need a VPS or remote desktop workaround.
- "Every Tick Based on Real Ticks" replays actual bid/ask ticks stored by your broker and is the only model precise enough for scalping and sub-M15 systems.
- A 99%+ modelling quality figure means nothing if the underlying history has gaps, mismatched charts or a fixed spread that never existed.
- Commission, swap and variable spread are the three costs most traders omit — and the reason profitable scalping backtests die live.
- Optimization without a Forward (out-of-sample) period is curve fitting with extra steps; set Forward to 1/3 or 1/4 and compare tabs before believing a result.
- Backtest metrics don't measure execution discipline, which is what actually decides whether you clear a prop evaluation's daily loss limit and max drawdown.
Watch: related video
What MT5 Backtesting Actually Simulates (and What It Doesn't)
MT5 backtesting is a tick-replay exercise, not a market simulation. You feed the Strategy Tester (Ctrl+R) historical price data, it reconstructs ticks, spread and margin conditions, and runs your Expert Advisor's logic against that stream to tell you how the strategy would have behaved. It cannot tell you how you would have behaved.
The 7-step backtest process in short
- Attach or select the Expert Advisor in the Strategy Tester.
- Set symbol and timeframe — including any multi-symbol/multi-currency logic.
- Pick the date range and forward-testing period.
- Choose the modelling method: every tick based on real ticks is the gold standard.
- Set deposit, leverage, and currency to match your intended account.
- Run the test and read the report: drawdown, profit factor, expected payoff, recovery factor.
- Optimize inputs, then forward-test on unseen data before trusting the result.
What the Strategy Tester models: ticks, spread, margin, orders
MetaQuotes built the Strategy Tester into the terminal itself — no plugin, no third-party add-on, which is part of why metatrader 5 backtesting is treated as the default standard over MT4's older single-currency engine. The tester reconstructs historical ticks (real or generated), applies the spread model you choose, calculates margin requirements and swap charges, and executes stop-loss, take-profit, pending orders and trailing logic exactly as your EA's code instructs. MT5's real-tick and multi-currency capability — testing a basket EA across correlated pairs simultaneously — is the single biggest reason it outclasses MT4 for anyone running anything beyond a single-symbol strategy.
What it never models: your hesitation, requotes, broker-side rejects
Here's where a lot of traders get burned. The tester assumes your order fills at the modelled price, minus spread. It doesn't reproduce network latency, partial fills during a liquidity gap around NFP or an FOMC statement, or a broker rejecting a trade during a volatility spike. It also can't model you — the five-trade losing streak that makes you skip the sixth signal, the itch to move a stop because "it'll come back." Backtest results are a clean-room number; live execution carries friction a report can never show you.
That's the frame for this entire guide: a backtest is a hypothesis test on historical data, not a forecast of future performance. Treat every equity curve from a backtest mt5 run as a starting point for forward testing and demo verification, not a green light to go live.
Step 1: Prepare MT5, Your EA and Your Price History
Before you run a single test, confirm three things: your terminal build is current, your EA is compiled and sitting in the right folder, and your symbol history actually covers the window you want to test. Skip any one of these and the Strategy Tester will either refuse to cooperate or hand you a report built on incomplete data — garbage in, garbage out.
Update the terminal and check your build
Open MT5, go to Help → Check for Updates, and confirm you're running a 2026 build. Older builds handle real tick storage and the Forward tab differently — some pre-2023 builds don't reconstruct sub-second ticks the same way, which quietly skews fill prices on fast-moving symbols like XAUUSD or NAS100. If you've had the platform installed for a while without touching it, this is the step people skip and then can't figure out why their tick model shows "Every tick based on real ticks" as greyed out.
Put the EA in MQL5/Experts and compile it
This is where most backtests die before they start. If you're wondering how to backtest an EA on MT5 and your strategy isn't showing up in the tester dropdown, it's almost always one of two things: the file was never compiled, or it's sitting in the wrong folder.
- File → Open Data Folder, then navigate to the MQL5/Experts folder.
- Drop your .mq5 or .ex5 file there (subfolders are fine — MT5 will nest them in the Navigator tree).
- If you have the source (.mq5), open it in MetaEditor and hit Compile (F7). A clean compile with zero errors produces the .ex5 the tester actually needs — a .mq5 alone won't run.
- Right-click Expert Advisors in the Navigator panel and Refresh. Your EA should now appear.
If you bought or downloaded a strategy from the MQL5 Market, it usually installs pre-compiled — but it's still worth confirming the .ex5 landed in Experts and not buried in a Market subfolder the tester doesn't scan by default.
Download symbol history in the History Center (F2)
MT5 doesn't ship with deep history for every symbol pre-loaded — you have to pull it. Open a chart for the symbol you're testing, scroll the chart back as far as it'll go (this forces MT5 to request older bars from your broker's server), then open the History Center with F2 to check what's actually stored. You want to see continuous bars — and for tick-based tests, downloaded ticks — spanning your full test window, not gaps where the chart just interpolates.
Real tick data is heavy: a multi-year tick history for XAUUSD alone can run into multiple gigabytes, so budget disk space and patience if you're testing gold or a busy index. As for how much history to grab — two to five years is the sweet spot for most swing and intraday strategies, because it's enough to capture a real mix of regimes: trending legs, choppy range-bound stretches, high-vol events like NFP or FOMC weeks, and the dead-quiet summer sessions where your strategy might just sit flat. Test only through a trending year and you'll never know how the system behaves in chop — and chop is where most equity curves actually die.
Step 2: Configure the Strategy Tester Settings Line by Line
Press Ctrl+R to open the Strategy Tester panel, and don't just click "Start" — every field on that panel changes what your backtest actually measures. Getting mt5 strategy tester settings wrong is the fastest way to produce a beautiful equity curve that means nothing live.
Expert, symbol, timeframe and date range
The Expert dropdown loads your EA file — obvious enough. The Symbol field matters more than most traders treat it: choosing XAUUSD versus EURUSD pulls that instrument's entire contract specification — tick value, contract size, margin requirement, swap — straight from your broker's symbol properties. Test a gold strategy against the wrong symbol's spec and your position sizing math is off before a single trade fires.
The Period field is where most people get confused during their first metatrader 5 backtesting tutorial. Setting Period to H1 does not mean the simulation runs on H1 resolution — it only tells your EA which timeframe's OHLC data to reference in its logic (iClose, iHigh, etc.). The actual tick-by-tick or bar-by-bar resolution of the simulation is controlled separately by the Model setting, which we cover in the tick data section. Confusing the two is a classic how to backtest metatrader 5 mistake.
For the date range, don't default to "last 12 months" out of laziness. Pick a window that forces your strategy through at least one genuine stress event — a NFP shock, a FOMC surprise, a flash-crash week — and at least one dead, low-volatility stretch like a August or late-December session. A strategy that only sees smooth trend never gets tested against the conditions that actually kill accounts.
Deposit, leverage and currency — match the account you'll actually trade
This is the field traders skip fastest and pay for hardest. Leverage deposit backtest mismatches are silent killers: a strategy backtested on 1:500 leverage with a $100,000 deposit behaves nothing like the same exact logic run on 1:30 with a $10,000 deposit. Margin calls trigger at different equity levels, position sizing formulas that scale off free margin produce entirely different lot sizes, and your max drawdown as a percentage of equity shifts completely.
Set Deposit, Leverage, and account Currency to match — field for field — the funded account or challenge account you actually intend to trade. If you're preparing for a challenge, test at that exact starting balance and leverage tier, not a round number that's convenient to type in.
Execution delay, visual mode and the inputs tab
The Execution delay dropdown lets you choose zero latency or a random delay (in milliseconds) that simulates real order fill lag. Zero latency is fine for quick logic checks; random delay gives you a more honest read on how a scalping or breakout strategy handles real-world slippage before you trust the numbers.
Visual mode replays the test bar-by-bar on a live chart so you can watch entries, stops and exits fire in real time — invaluable for debugging logic, painfully slow for a multi-year run. Use it in short bursts, not for the full backtest.
Finally, the Inputs tab holds every external variable your EA exposes — lot size, stop distance, moving average period. Set your baseline value in the Value column, then fill Start/Step/Stop only if you plan to optimize; those three columns define the grid MT5 will crawl through later, so keep step sizes sane or you'll be running optimizations for days over nothing.
Step 3: Choose the Right Tick Generation Model
Every Tick Based on Real Ticks replays the actual bid/ask ticks your broker captured and stored, instead of manufacturing intrabar price movement out of M1 bars — that's the exact distinction the MT5 Strategy Tester manual draws, and it's the single most misunderstood setting in the tick generation model dropdown. Get this wrong and your backtest can look profitable for reasons that have nothing to do with your logic.
Every Tick Based on Real Ticks — what the documentation actually means
This mode doesn't simulate ticks — it plays back the ones your broker's server actually logged, complete with real spread widening, gaps and the messy microstructure that happens around news. The catch: it only works as well as the tick archive behind it. A broker with deep, continuous history gives you a faithful replay. A broker with a thin or patchy archive silently falls back to lower-quality synthetic generation for the missing stretches — MT5 doesn't throw a loud warning, it just fills gaps. Always check the Journal tab for "ticks generated based on…" messages before you trust the equity curve.
Every Tick, 1 Minute OHLC and Open Prices Only
Plain "Every Tick" (without the real-tick qualifier) generates synthetic ticks inside each M1 bar using a mathematical model rather than actual recorded prices — faster than real ticks, less faithful. 1 Minute OHLC only uses the four corner prices of each minute bar to build the price path, which is fine for swing systems that don't care about what happened between opens and closes. Open Prices Only ignores everything except the bar open, making it the fastest mode and a reasonable first-pass sanity check for EAs that only act on bar close.
Math Calculations mode and when it's useful
Math Calculations mode skips price-and-indicator logic entirely and is built for testing mathematical/statistical models that don't reference chart data the normal way — think custom equity curve simulations or money-management logic layered on top of an existing result set. Niche, but the right tool when your "strategy" is really a formula.
| Model | Accuracy | Relative Speed | Data Requirement | Best Use |
|---|---|---|---|---|
| Every Tick Based on Real Ticks | Highest | Slowest | Broker's full tick archive | Scalping, sub-M15, intrabar stops |
| Every Tick (synthetic) | Medium | Slow | M1 data | When real ticks unavailable |
| 1 Minute OHLC | Medium-low | Fast | M1 data | Mid-frequency swing systems |
| Open Prices Only | Low | Fastest | Bar data | Bar-close EAs, quick sanity checks |
| Math Calculations | N/A (formula-based) | Fastest | None (custom input) | Indicator-free mathematical models |
Rule of thumb: if your entries or stops react to anything inside a candle, run Every Tick Based on Real Ticks — nothing else is trustworthy. For swing logic evaluated once per bar, 1 Minute OHLC saves hours without meaningfully skewing results. Save Open Prices Only for the first pass where you're just checking the EA compiles and fires trades in the right direction.
Step 4: Model Your Real Trading Costs, Not Your Hopeful Ones
A strategy that nets $3,000 on paper with 1-pip spreads can bleed money live at 3 pips — this is where most backtests quietly lie to you. Before you trust a single equity curve, open your symbol specification and check what MT5 is actually charging you in the tester, because the defaults are rarely the truth.
Spread: fixed, current, or historical variable
The Strategy Tester's Spread field has three modes, and picking the wrong one for the wrong reason wrecks your numbers. Current grabs whatever spread your terminal shows the moment you launch the test — fine for a quick sanity check, useless for anything you'll trade through a London open or NFP spike. A fixed value (say, 20 points on XAUUSD) is a fiction unless your broker genuinely quotes fixed pricing, which most ECN-style accounts don't. The only honest option for variable-spread accounts is real ticks with historical bid/ask baked in — this replays the actual spread widening that happened at 8:30am EST on NFP day, not a flat number you picked because it made the equity curve look smooth.
Commission per lot and swap/rollover
MT5 pulls commission and swap straight from the symbol specification, not from your strategy code. If you're testing a symbol where commission is configured at zero — common on default demo templates — every scalp in your report understates its real cost. This is the classic spread commission swap backtest trap: a 100-trade scalping EA looks like a money printer until you apply commission properly.
| Scenario | Round turns/month | Cost per lot | Monthly cost | Reported net (backtest) | Real net |
|---|---|---|---|---|---|
| Commission ignored | 100 | $0 | $0 | $1,400 | $1,400 |
| Commission modelled | 100 | $7/lot | $700 | $1,400 | $700 |
| Commission + swap (held overnight) | 100 | $7 + avg $1.20 swap | $820 | $1,400 | $580 |
Slippage assumptions and news-window blowouts
The tester's built-in slippage is a random delay measured in milliseconds — it has nothing to do with a 40-point gap through your stop on XAUUSD at the London open, or a US100 futures-linked CFD skipping levels at the cash open bell. Proper slippage modelling means stress-testing your EA with wider assumptions specifically inside known volatility windows: NFP, FOMC, CPI. If your backtest never gaps, you haven't tested slippage — you've tested a world that doesn't exist.
Why XAUUSD and US100 need their own cost profile
Multi-asset backtesting means multi-asset cost modelling. An mt5 backtest xauusd run needs the correct contract size and tick value for gold (typically 100 oz per lot, so a $0.01 tick move isn't the same dollar impact as on a forex pair). A US100 backtest needs the index's own point value and needs to account for overnight session gaps and rollover widening around futures expiry — spreads on indices often triple outside regular trading hours. Copy your forex cost settings onto gold or an index and your backtest will lie to you in a completely different currency of pain.
Step 5: Check Modelling Quality and Data Integrity Before You Trust Anything
A 99% mt5 modelling quality score tells you the tester found enough 1-minute data to rebuild ticks densely — it says nothing about whether that underlying data is actually correct. High modelling quality on garbage history just gives you a very smooth, very confident lie.
What the modelling quality percentage really tells you
MT5 grades modelling quality from 0-99% based on how much granular history it has to synthesize ticks within each bar. 90%+ means the tester had solid 1-minute coverage to work with. But that percentage is a measure of density, not correctness — a broker can hand you dense, complete, perfectly interpolated data that's been mispriced, has a stale feed, or resets spread to a flat constant across the whole archive. None of that shows up in the score. Treat modelling quality as a minimum bar to clear, not proof your backtest is trustworthy.
Mismatched charts errors, gaps and zero-volume bars
Open the Journal tab after every run before you look at a single equity curve number. Scan for the mismatched charts error — it fires when the tester's built-in data disagrees with what's plotted on your live chart, usually a sign of a symbol mismatch or a broker history rebuild gone wrong. Alongside it, watch for:
- Weekend and holiday gaps that don't align with the instrument's real session calendar (a gold gap on a Tuesday should raise your eyebrows).
- Missing sessions — entire days silently absent from the download, which will quietly skip trades your strategy should have taken.
- Flat-lined, zero-volume bars — periods where price doesn't move tick to tick, often a dead feed being padded rather than genuine low liquidity.
Then switch to Visual mode and eyeball the tester chart directly. Suspiciously straight diagonal lines across several bars, prices that snap instead of drift, or volume spikes that don't match known news events (FOMC, NFP) are all tells that the history feeding your test isn't clean.
Importing custom tick data and building custom symbols
Broker history isn't always good enough. Thin archives past a couple of years, symbols that got renamed mid-history (breaking continuity), and historical spread reset to a constant are the three most common failure modes — and each one silently changes your backtest's edge without ever throwing an error.
The fix is to import third-party tick data as a custom symbol via the Symbols window (View → Symbols → Custom → Import), pointing MT5 at a clean CSV or FXT tick file from a reputable data vendor instead of your broker's own archive. Alternatively, run the identical test on a second broker's data feed and diff the results side by side.
If the two sources disagree materially on drawdown or expectancy, the edge lives in the data, not the strategy — fix the data before you touch a single input parameter.
Step 6: Read the Report — Metrics That Predict Live Behaviour vs Metrics That Lie
Open the Backtest tab first, the Graph tab second, and only then the Results tab with its wall of numbers — because a single glance at the equity curve will tell you more than half the stats below it. Read them in this order: drawdown, then curve shape, then profit factor and recovery factor together, then trade count, and Sharpe Ratio dead last (if at all).
Maximum Drawdown: balance vs equity
MT5 reports two drawdown figures, and traders who confuse them get blindsided in live challenges. Balance drawdown only updates when a trade closes — it ignores how deep you were underwater mid-trade. Equity drawdown (the "Relative" % figure) tracks floating losses on open positions tick by tick, which is exactly what a prop firm's daily loss limit and max drawdown rule are measuring in real time. A strategy showing 8% balance drawdown can easily have spiked to 15% equity drawdown intraday — and that's the number that busts a challenge account, not the tidy closed-trade figure.
Profit Factor's blind spot
Profit factor (gross profit ÷ gross loss) above 1.5 looks clean on paper, but it's trivially easy for one outlier trade to carry the whole ratio. Pull that single trade out of the report and re-run the math manually — if profit factor collapses toward 1.0, your edge isn't a system, it's a lottery ticket that hit once in your sample.
Recovery Factor and LR Correlation say more about consistency
Recovery factor (net profit ÷ max drawdown) tells you how efficiently the strategy earns back what it risks — above 2 is workable, above 3 is strong. LR correlation (linear regression correlation of the equity curve) measures how close your growth line sits to a straight, smooth trend; anything above 0.90 suggests steady compounding rather than a curve that lurches and stalls.
Sharpe Ratio and trade count
Sharpe ratio on 40 trades is noise dressed up as insight — the standard deviation calculation needs volume to mean anything. Treat a few hundred closed trades as the rough floor before trusting Sharpe, expectancy, or any distribution-based metric at all.
Trade count, expectancy and the shape of the equity curve
Expectancy (average $ or R won per trade across all trades) matters more than win rate — a 35% win rate with 2.5R average winners beats a 65% win rate scalped for breakeven. Visually, look for a stair-step curve climbing steadily; a single vertical leg carrying 80% of total profit means the backtest period got lucky once, not that the edge repeats.
| Metric | Where it hides | What to check instead |
|---|---|---|
| Balance Drawdown | Only counts closed trades | Equity (Relative) Drawdown |
| Profit Factor | Skewed by one outlier | Recompute excluding largest win |
| Sharpe Ratio | Meaningless below ~300 trades | Trade count first, Sharpe second |
| Total Net Profit | Can come from one lucky leg | Equity curve shape (stair-step) |
Last thing most traders skip entirely: average holding time and trades per day, buried in the Backtest tab. If your average trade runs three days but your challenge has a 30-day deadline and a max of 10 trading days used, the math on trade frequency alone can eliminate a strategy before you've even checked its edge.
Ready to trade funded capital?
Choose your path — Instant Accounts, One-Step or Two-Step Challenges — from just $23, with up to $300,000 in funded capital.
Choose your challengeStep 7: Optimize, Then Verify on the Forward (Out-of-Sample) Period
Optimization tells you which parameter set worked best on history. Forward testing tells you whether that same set had any right to work, or whether MT5 just found the one combination that fit the noise. Skip the forward split and you're not optimizing a strategy — you're curve fitting a story.
Setting up a genetic algorithm optimization
In the Inputs tab, tick the box next to every parameter you want tested and set Start, Step and Stop values — keep ranges tight and logical (an ATR multiplier from 1.0 to 3.0 in steps of 0.25, not 0.1 to 10). In the Settings tab, switch the optimization mode from "Slow complete algorithm" to Fast genetic based algorithm. A full brute-force pass over five parameters can mean millions of combinations; the genetic algorithm samples a fraction of that space and converges on strong regions in a fraction of the time. If your parameter grid is large, enable MQL5 Cloud Network agents under the Agents tab — you rent remote compute instead of tying up your own machine for six hours.
Choosing an optimization criterion that isn't just net profit
The dropdown next to "Optimization criterion" defaults to Balance Max — resist it. Raw balance rewards the single best equity curve regardless of how it got there, including one lucky trade dragging the whole result. Pick Complex Criterion max, which blends profit, drawdown and consistency, or manually target Balance combined with a high Recovery Factor. You want the optimizer ranking strategies on shape, not just size.
Setting the Forward period to 1/2, 1/3 or 1/4
Back in the Settings tab, set "Forward" to 1/3 (or 1/2, 1/4 depending on your sample size). MT5 automatically slices your date range — the first two-thirds becomes the in-sample optimization window, the final third is held back, untouched, as the forward period out-of-sample test. This single field is the difference between MT5 optimization and MT5 optimization with actual forward testing.
Reading the Forward tab against the Backward tab
Run the optimization. The Optimization Results tab shows every parameter set ranked on in-sample data. The Forward Results tab reruns those same top sets on the untouched slice. Now compare:
- A set that ranks top 10 in-sample and falls apart forward is curve fitted — drop it.
- A set that ranks mid-table in-sample but holds its shape forward is the one you keep.
Open the 2D optimization graph and look for a plateau, not a spike — if profit holds steady across a neighboring range of your ATR or lookback values, the edge is real. A single narrow peak surrounded by losses is noise. Repeat the split at two or three different starting points across your history as a poor-man's walk-forward analysis — if the same parameter neighborhood keeps holding up, you've earned some confidence in it.
How to Backtest Manually in MT5 Without an EA
Yes — you can backtest without an EA in MT5. Load any expert onto the tester (even an empty do-nothing one, or none at all in newer builds) and run it in Visual mode, then trade the tester's chart yourself with the mouse, exactly like you'd trade a live chart. It's slower than coded backtesting and it's the only realistic option for a discretionary trader who reads structure, order flow or price action rather than a fixed rule set a machine can execute.
Using Visual mode to replay bar by bar
In the Strategy Tester, tick Visual mode before you hit Start. This opens a live chart that replays your chosen symbol and period from the history start date forward, tick by tick, at a speed you control with the slider in the toolbar. Drag it left to crawl bar by bar, or right to blast through a dead Tuesday afternoon in seconds. The pause button is your most important tool here — hit it the moment a bar closes, before you look at what comes next. This is the core of visual mode strategy tester work: you're not watching a finished chart, you're rebuilding one candle at a time, forced to make decisions with the same information you'd have had live.
Placing manual trades in the tester's visual chart
Recent MT5 builds let you open, modify and close positions directly from the visual tester chart — right-click for a trade panel, drag your SL/TP lines like you would on a normal chart, or use one-click trading if you've enabled it in the tester's settings. This is what makes genuine manual backtesting mt5 possible without writing a line of MQL5. Set up a protocol before you touch the mouse:
- Fixed risk per trade — same % or same lot logic every time, no sizing up on "obvious" setups
- Written entry rule — one sentence you could hand to another trader and get the same trade
- Minimum 100 trades — anything less and your win rate is a coin flip with extra steps
- No scrolling forward before deciding — decision first, then advance the bar
Keeping a manual backtest log that's worth reading
The honest problem with a discretionary backtest is hindsight leakage — you already half-know how the session played out from the chart shape ahead, and that quietly inflates your win rate. Screenshot the chart the instant before you decide, log the reason for the trade in one line, then advance. Review the screenshots later against your log, not the other way round. Journal spreadsheet columns worth keeping: date, setup type, R:R planned, R:R achieved, and a one-line "would I take this again" note.
Third-party bar replay tools (TradingView's replay, dedicated replay platforms) work well for pattern drilling and are often faster to set up than MT5's tester, but they usually simulate spread and execution more loosely than MT5's own tick engine — fine for training your eye, not for final validation of costs and fills on the instrument you'll actually trade.
MT5 Backtesting: Strengths and Blind Spots
Pros
- Native Every Tick Based on Real Ticks model replays actual broker bid/ask ticks — no third-party tick importer needed
- Broker-accurate contract specs mean commission, swap, margin and tick value are pulled automatically for XAUUSD, indices and FX
- Built-in Forward (out-of-sample) period splits the test range automatically, so out-of-sample verification takes one dropdown
- Genetic algorithm plus free MQL5 Cloud Network agents makes large multi-parameter optimizations practical on a normal laptop
- Visual mode supports manual bar-by-bar testing for discretionary traders who don't code
- Multi-currency and multi-symbol testing on a single account, which MT4 could never do properly
Cons / risks
- Desktop only — no Strategy Tester in the web terminal or mobile apps, so browser and phone users need a VPS
- Test quality is capped by your broker's tick archive; thin or reset history quietly degrades results with no obvious warning
- Cannot model requotes, partial fills, liquidity holes around NFP/FOMC or broker-side rejects
- Historical spread on some symbols is stored as a constant, which flatters scalping and low-timeframe systems
- No native Monte Carlo or full walk-forward automation — you have to stitch those together yourself
- Real tick datasets for gold and indices are large and slow to download and re-verify
Ready to trade funded capital?
Choose your path — Instant Accounts, One-Step or Two-Step Challenges — from just $23, with up to $300,000 in funded capital.
Choose your challengeFrequently Asked Questions
What is MT5 backtesting and what does it simulate?+
MT5 backtesting replays historical price data through the Strategy Tester to see how an Expert Advisor or manual rule set would have performed without risking capital. It simulates order execution, spread, commission, swap, and slippage against tick or bar data depending on the modelling mode you pick. The tester rebuilds ticks from available history when true tick data is missing, which is why modelling quality matters as much as the equity curve. Think of it as a rehearsal, not a guarantee — real markets add latency and liquidity gaps a backtest can't fully capture.
How do I backtest an EA on MT5 step by step?+
Compile the EA in MetaEditor, open Strategy Tester (Ctrl+R), select the EA, symbol, timeframe, and date range, then choose your execution model before hitting Start. Set spread (current or custom), enable optimization only after a baseline single run passes sanity checks, and review the Journal for compile or runtime errors first. Once it finishes, read the report tab for net profit, drawdown, and profit factor, then open the graph to eyeball the equity curve for smoothness versus lucky spikes. A clean report with a jagged curve usually means the sample is too small or too dependent on one trade cluster.
Can you backtest using the MT5 web terminal?+
The MT5 web terminal does not include a Strategy Tester — backtesting and optimization only run in the desktop terminal on Windows, or via Wine/virtual machine on Mac and Linux. The web and mobile versions are built for monitoring and executing trades, not simulating historical performance. If you only have browser access, you can still analyze historical charts manually, but automated tick-by-tick testing requires the full desktop application. This is a common gap traders hit when trying to backtest mt5 strategies from a laptop without admin rights to install software.
Can you backtest on the MT5 mobile app?+
No native Strategy Tester exists on MT5 mobile — Apple and Android apps are execution and charting tools only. The practical workaround is running the desktop terminal on a VPS and checking results remotely through remote desktop apps, or backtesting on desktop first and only monitoring live/demo execution from mobile. Some traders use mobile purely to eyeball manual setups on higher timeframes while the actual bar-by-bar or tick-by-tick simulation happens on a PC. If mobile-only testing is a hard requirement, you're better served by a browser-based backtesting tool built for that purpose.
What does 'Every Tick Based on Real Ticks' mean in MT5?+
Every Tick Based on Real Ticks reconstructs the exact historical tick sequence from your broker's or a third-party tick data provider, giving the highest-fidelity simulation MT5 offers including realistic spread variation and slippage. Use it for scalping, news-trading, or any strategy sensitive to intrabar price path, since '1 Minute OHLC' and 'Open Prices Only' only sample four or one price points per bar and can hide stop-outs that happened mid-candle. The tradeoff is speed — real tick testing is far slower and needs deep, clean tick history. For swing or position strategies holding for days, 1-minute OHLC is usually accurate enough and dramatically faster to optimize.
How do I check modelling quality before trusting an MT5 backtest?+
Modelling quality is the percentage shown in the report header (aim for 90%+ on Every Tick tests) that tells you how much of the simulated price path is backed by real historical data versus interpolated bars. Below roughly 25-50% on Every Tick, gaps in your history are being filled in synthetically, which can silently invent or erase stop-outs. Check the Symbols window for missing history ranges, download deeper tick data through the History Center, and re-run after gaps are filled. A backtest with high net profit but low modelling quality is not evidence of anything — it's noise dressed as a result.
How do I run and validate an MT5 optimization with out-of-sample testing?+
Split your date range into an in-sample period for optimization and a separate out-of-sample (forward) segment the optimizer never sees, then run Every Tick optimization on the in-sample window using the genetic algorithm for large parameter spaces. Take the top 3-5 parameter sets — not just the single best one — and manually re-test each against the forward segment to see which holds up. A strategy that performs well in-sample but collapses out-of-sample is curve-fitted, full stop. This forward-segment check is the single fastest way to kill a bad strategy before it costs you a funded account evaluation.
Which MT5 metrics actually predict live trading behaviour?+
Profit factor, maximum drawdown, and the ratio of largest win to average win are more predictive than net profit or total trades, because they expose how dependent your results are on outlier trades. A high Sharpe-like ratio with a smooth equity curve and drawdown recovery time under a few weeks tends to translate reasonably well to live or demo conditions. Metrics that lie in isolation include net profit (meaningless without drawdown context) and win rate (a 90% win rate with one huge loss is a losing system). Always cross-check the equity curve visually — numbers alone hide the shape of the risk you took.
How do I know if my MT5 backtest results are curve-fitted?+
Curve-fitting shows up as strong in-sample performance that falls apart on out-of-sample data, on a different symbol, or on a shifted date range — if any of those breaks the strategy, the original result was fitted to noise, not edge. Walk-forward testing, reducing the number of optimized parameters, and testing across multiple market regimes (trending and ranging periods) are the fastest ways to expose it. A rule of thumb: if a strategy needs more than 4-5 optimized inputs to look profitable, you're probably fitting curves rather than finding a repeatable edge. Simpler logic that survives forward testing beats a complex one that only worked in the past.
How do I set up an MT5 backtest to match prop firm evaluation rules?+
Configure the Strategy Tester's initial deposit, leverage, and account currency to match your target challenge, then add a custom max daily loss and overall drawdown check in code or manually flag any day where equity dips past the firm's limit. Standard MT5 reports don't natively track daily loss limits, so you need to inspect the trade-by-trade equity log or use a script that flags breaches against your evaluation's specific rules. Run the backtest across a period that includes at least one high-volatility event like NFP or FOMC, since that's usually where daily loss limits get hit. Passing a backtest that ignores these constraints tells you nothing about whether the same strategy survives an actual Two-Step Challenge.
Written by
Marcel Hambálek
Senior Trader, For Traders
Marcel trades Futures and Forex day-trading setups on funded accounts and writes about the executional details most traders skip — order types, slippage, session timing, platform quirks on MT5 and NinjaTrader. Pragmatic, mechanics-first, no fluff.
Follow on LinkedInReady to trade funded capital?
Choose your path — Instant Accounts, One-Step or Two-Step Challenges — from just $49, with up to $300,000 in funded capital.
Choose your challengeTrade up to $300,000
Choose challenge