A profitable backtest can differ sharply from live trading when the data, execution assumptions or parameter selection are unrealistic. This guide explains the MT4 and MT5 testing modes, cost modelling and out-of-sample checks that help diagnose those differences.

MT4 versus MT5 Strategy Tester — what really differs

Strategy Tester runs an Expert Advisor on history in both platforms. MT5 supports multi-symbol tests and distributes optimisation passes among agents; this does not mean one EA run automatically uses every core. MT4 also has a genetic optimiser, but its standard tester does not execute trades on symbols other than the tested one. Adding separate reports does not reproduce shared portfolio capital. Record the program build, compiled EA, inputs, symbol specification and account assumptions. History Center’s downloaded MT4 data can differ from the broker’s server history. Neither data duration nor a timeframe label determines suitability. Background in MT4 basics and the MT5 feature comparison.

Many ticks do not mean many minutes with ticks

Before comparing data-quality percentages, identify whether the count concerns time intervals or individual records.

Scroll sideways to see the full diagram

Many ticks do not mean many minutes with ticksOur dataset has three minutes with available minute bars. The first contains 10 real ticks, the second 10, and the third none. For this example the generator creates 80 records in the third minute. Record-count bars share a scale: 10, 10, 80. Real-tick minute coverage is 2 of 3, about 66.67%, while real records make up 20% of the final 100 records. These are two custom measures with different denominators, not Modelling Quality or an actual tester result.TWO DIFFERENT DENOMINATORSThree fictional minutes • record countMinute 1 • real10Minute 2 • real10Minute 3 • generated80020406080Minutes with real ticks: 2 /3Minute coverage ≈ 66.67%Real records: (10 + 10) /100Record share = 20%

Assumptions: Fictional data for three equally long minutes, each with a minute bar. The counts 10, 10 and 80 form the complete controlled dataset; minute three contains only generated records. This does not assess an actual market feed or test.

Our dataset has three complete minute bars. Two minutes contain 10 real ticks each. The third has a minute bar but no real ticks; this fictional example generates 80 records there. The final dataset contains 100 records.

Our real-tick minute coverage is 2 /3 ≈ 66.67%. Our share of real records is 20 /100 = 20%. Numerous records in one minute change the second denominator without adding another minute of history. The percentages are not interchangeable and neither establishes a strategy edge.

MetaQuotes — real and generated ticks describes filling minutes with no available ticks when a minute bar exists. We invented the number 80 for the calculation; it is not a tester report value. Both measures are custom and do not define the Modelling Quality field.

Time coverage and record share answer different questions.

Modelling modes and historical data quality

MT4 offers Open prices only, Control points and Every tick modelling. These modes use bar history and generated paths; Control points is a coarse preliminary estimate. MT5 additionally offers recorded broker ticks and 1 minute OHLC. Intrabar stops can matter even for a daily signal, while a rule compatible with bar-opening operation may permit simplification after checking the model’s limits. In MT5, a minute bar lacking real ticks can be filled with generated ticks. Real-tick spread can vary within a minute; generated ticks use the minute bar’s assigned spread.

Check historical data coverage for the specific instrument and period. Importing external ticks into MT4 requires a compatible process and may involve generated test files or additional software; HST bars alone do not guarantee genuine tick modelling. A reported quality percentage is not proof of realistic execution. In MT5, inspect real-tick coverage and any generated replacements.

Simulation parameters — spread, commission, swap, slippage

Check spread, commission, financing and execution-delay settings for the product and account. Standard MT4 adds its selected spread to Bid history; the default uses the current spread at the start of testing, rather than a complete historical spread path. With an assumed five-decimal EUR/USD quote, 12 points of 0.00001 equal 1.2 pips of 0.0001. MT5 supports account or custom commissions: inspect whether charges apply to entry, exit or both, and reconcile one closed trade. Its profit-in-pips mode omits commission, swap and margin control. Delay emulation is a scenario, not a reconstruction of all live liquidity or fills.

Three pitfalls that wreck a backtest

Look-ahead bias means using information unavailable at the decision time. A timeseries reference with shift zero denotes the current bar, which evolves during the simulation. At 10:15, the high already reached by the H1 bar starting at 10:00 is available; its final hourly high is not. A completed-hour rule must wait. Do not change every zero to one: valid new-bar detection and current-price rules would change too. Check the timestamp, copied count and array indexing direction for every input.

In a hypothetical successful CopyRates call, four closes from oldest to current are 100, 101, 102 and 103. In a dynamic array with as_series = false, rates[1].close is 101 and the last completed close is rates[2].close = 102. With as_series = true, rates[1].close is 102. The rule “last completed close >101.5” is true, yet a mistaken normal-array rates[1] read rejects it. This is an old-bar identification error, not evidence of future information. Do not index as if four records exist when the call returns fewer.

Overfitting can occur when repeated searches select favourable noise. High win rate, profit factor or low drawdown alone is not proof of it. Survivorship bias occurs when the test universe excludes instruments or accounts that were available historically but later disappeared. Build the universe using what was available at each date; there is no verified universal 30–50 percent inflation of results.

Reading the report and walk-forward as the antidote to curve-fit

Read net outcomes, trade counts, drawdown and cost assumptions together. In a hypothetical PLN account starting at 10,000, closed gains of 500 produce balance 10,500; an open loss of 700 leaves equity 9,800 before other charges or changes. Balance alone hides that exposure. Profit-factor or Sharpe thresholds do not certify a strategy. Inspect sensitivity and genuinely separate evaluation data, and preserve both reports and logs.

Walk-forward testing evaluates successive frozen parameter selections on later periods. Compare consistent annualised returns and inspect the chronological out-of-sample trade series. WFE alone cannot prove robustness or identify curve-fitting, and a zero or negative in-sample return complicates interpretation. See walk-forward analysis for the procedure.

Out-of-sample tests assess frozen rules on data excluded from the associated parameter search. They remain simulations with data and execution assumptions, rather than verified future live performance.

Limits of MT4/MT5 and when to reach for other tools

Strategy Tester evaluates coded rules under its data and execution model. A discretionary judgement needs recorded criteria and a replay protocol before it can be compared meaningfully; it is not automatically untestable. Choose another tool if a required input or execution mechanism cannot be represented, and check its current documentation and data terms. Our Forex Tester comparison addresses a different replay workflow. Platform-independent methodology lives in how to backtest a strategy correctly; wider context sits in the trader’s workshop in our library.

Does tester TimeGMT validate a UTC time filter?

In the MT5 tester, TimeGMT equals simulated TimeTradeServer. Comparing these functions in one test does not reconstruct the broker’s historical offset from UTC. Identify each time axis and test conversion on explicit inputs. A fixed “subtract two hours” does not document changes to server time.

Does tester TimeGMT validate a UTC time filter?

Does tester TimeGMT validate a UTC time filter?One fictional instant: 12:00 UTC and 14:00 at the declared UTC+2. The filter covers 12:00–13:00 UTC.12:00 UTCdecision timeUTC + 2explicit assumption14:00server readingUTC filter12:00–13:00
Tester function equality is not a broker’s historical offset table.

Our model allows times from 12:00 inclusive to 13:00 UTC exclusive. A decision at 12:00 UTC is inside the window. Under the declared UTC+2, that instant reads 14:00; treating the 14 as UTC would reject it. The +2 assumption belongs only to this sample. Test the exact end boundary, date changes and every offset transition in the actual documented schedule separately.

Exercise: do two equal tester clocks prove the filter behaves identically live?

No. They establish equality within the simulation. Assess conversion using explicit UTC, a documented offset for the date and interval-boundary tests. A function name does not establish the broker’s time zone.

Check the export before the next test run

Prepare five columns headed timestamp,open,high,low,close with explicit time-zone offsets. In the local CSV coverage checker, enter the first and last expected bar openings and the interval. The synthetic M1 example from 08:00 through 08:11 has twelve rows but only eight distinct valid timestamps: four empty positions, two repeated rows and one conflicting OHLC group. Save the report, then investigate gaps against the product’s sessions. Complete OHLC does not prove complete recorded tick history; the checker neither inserts prices nor validates the tester’s execution model.

What to do tomorrow

  1. Choose a documented dataset for the intended product and dates. In MT4, inspect bar history, modelling and any external FXT preparation. In MT5, inspect real-tick coverage and generated replacements. Archive the provider, time zone, missing periods and model settings; a mode’s name alone does not establish validity.
  2. Configure the costs and available execution-delay settings for your actual test environment. Use the account’s documented commission, financing and spread assumptions, then stress less favourable conditions. Avoid applying fixed $7 and pip penalties as universal broker parameters.
  3. Use four years for parameter selection and the following year for a frozen out-of-sample test, if that division suits the strategy. Compare annualised returns on a consistent basis, but do not diagnose curve-fitting solely because WFE is below 0.5. Review sample size, regimes and costs, and preserve an untouched final evaluation.
  4. Review when each price and indicator value becomes available. Change index zero to a completed-bar reference only if the strategy requires completed bars. Compare the resulting signal timestamps and trades; a 30 percent result change is not proof of look-ahead bias by itself.

Explore real source data

2560 EUR/USD publications, 49 unpublished weekdays and an independently checked TARGET calendar. Data, chart and code.

An unpublished rate is not a data gap: the ECB calendar, 2016–2025 →