A backtest is a question asked of a model: how would this Expert Advisor have behaved on this history, under these settings? It is not an account statement or a promise about future returns. Start with a question you can investigate, such as whether the EA follows its own exit rule. Save the configuration and explain unexpected trades before comparing profit figures.
1. Keep one reproducible baseline
MT5 distinguishes a single test with selected inputs from optimization across input combinations. Record the EA version, inputs, symbol, timeframe, dates, test mode, account currency, initial virtual balance and leverage. Save the report and journal. If two runs differ, compare those records first. A different result does not by itself establish a platform fault or an improvement in the strategy. [1]
An indicator reading on a forming bar can change before that bar closes. In MQL5, CopyBuffer start_pos 0 requests the current bar; it is not a promise that the value is final. Distinguish that source position from the receiving array index: CopyBuffer places the oldest copied value first in physical memory, and array indexing direction affects how you access it. Record the requested bar, timeframe and decision timestamp when checking the EA. [6][7]
Consider a fictional bar that is still trading at 100 when a decision is recorded and later closes at 104. Using that final 104 to justify an earlier decision would use information that was not yet available. This invented timeline is an illustration of look-ahead, not an MT5 test result, a broker quote or a trading rule. A current-bar strategy is not automatically invalid: evaluate it with values available at each decision. Using a closed bar alone does not prove that an indicator never revises history or that an EA is correct.
2. Read the data model before the equity curve
Generated ticks and broker-supplied real ticks are different inputs. Real ticks can capture spread changes within a minute. However, selecting real-tick testing does not prove that every minute has supplied ticks: MT5 can generate ticks where a minute bar exists without corresponding tick data. Inspect coverage and the journal rather than treating the selected mode as a completeness certificate. [2]
Order handling also differs between tester modes. Simplified modes can fill pending orders and protective exits at their specified levels rather than applying the execution approach used in more detailed modes. A strategy that depends on movement within a bar therefore needs careful model comparison. Tester behavior is not a guarantee of live broker execution. [5]
3. Do not let a fast estimate hide costs or margin
The tester's profit-in-pips option excludes swap and commission calculations and does not perform margin control. Use it only as a rough preliminary estimate. It cannot establish an affordable live position size. Execution-delay settings model a particular request delay; they do not reproduce every source of slippage or liquidity risk. Pending-order placement delay must not be confused with delay when that order subsequently executes. [1]
Check the actual instrument and account terms separately. This guide has not verified XESUN account-specific EA permissions, tick-history coverage, commissions, financing, margin limits or live execution. A platform feature is not evidence that every broker account offers identical conditions.
4. Separate fitting from an unseen period
Optimization repeatedly tries inputs. The winning set may fit historical coincidences. MT5's forward-testing feature separates a later historical interval from the interval used for optimization. Keep that interval untouched while choosing inputs, and record each experiment. Once you repeatedly select settings because of its results, it no longer serves as an untouched check. [3]
Historical forward testing is still a simulation on recorded data. Running the unchanged EA on a demo account as new quotes arrive is a separate operational exercise. Neither establishes future profitability. A poor result can be useful evidence to stop and investigate; it is not a reason to increase exposure to recover losses.
5. A high win rate can still accompany a loss
Win rate counts positive outcomes; it does not measure how large the wins and losses were. The MT5 testing report presents profitable-trade percentages, average winning and losing values, and Expected Payoff as different statistics. Read the field definitions and counting unit before comparing them. A mean calculated from a recorded sample describes that sample; the word expected is not a promise about the next trade. [4]
Paper example: invent 100 completed trades for each of two records, with all assumed costs already included in each USD result. A has 75 wins of +1 USD and 25 losses of −4 USD: 75 − 100 = −25 USD, or −0.25 USD per trade despite a 75% win rate. B has 40 wins of +3 USD and 60 losses of −1 USD: 120 − 60 = +60 USD, or +0.60 USD per trade with a 40% win rate. These are invented net trade outcomes, not XESUN quotes, actual EA tests, account-return percentages or a recommendation to choose B. Do not subtract the same assumed costs again.
The totals do not tell you the order of losses, open-position risk, volume, capital required or maximum drawdown. Equal trade counts do not imply equal exposure. Neither the 100 observations nor their mean establish future probabilities, profitability or suitability. A new loss can be larger than any in the sample. Keep the existing drawdown and cost checks alongside these statistics; do not increase size to make a negative history recover.
- Recalculate the two paper records first; no deposit or trade is needed. Divide each net total by 100 and distinguish money per completed trade from a percentage return on account capital.
- For an available test or demo record, note the period, symbol, volume basis, account currency, included costs and what one counted result means. Distinguish completed trades from execution deals or partial fills; do not force your count to match a headline field without checking its definition.
- Reconcile missing cost entries or inconsistent counting before comparing averages. Keep trade order and open exposure for the separate drawdown review. If the evidence is incomplete, mark the comparison unresolved rather than ranking the records or extrapolating a future result.
6. Hypothetical example: profit and drawdown answer different questions
Suppose a fictional test starts with balance and equity of USD 1,000 and ends with both at USD 1,040, with no open positions at either endpoint. During the run, equity reaches USD 1,100 and then falls to USD 770. That decline is USD 330, or 30% of that peak. The final USD 40 increase does not describe the intervening loss. For this example, assume that is the largest peak-to-trough decline and there are no deposits or withdrawals.
The figures are invented arithmetic, not XESUN prices, actual EA results or a return forecast. This is an account-value illustration, not a calculation of any account’s net return. MT5 reports distinguish balance and equity drawdowns; review both and how they are defined. Closing losing positions changes balance, while open losses can already affect equity. [4] A drawdown observed in a test is not a maximum loss you can rely on in the future.
7. A demo workflow that produces an audit trail
- Preserve a baseline report and explain one complete sequence of entry, modification and exit. Record the decision time, symbol, timeframe, requested source position and the value actually read.
- Change one documented assumption at a time. Keep unsuccessful runs too.
- Compare a reserved historical interval without selecting inputs from its results.
- If you continue, use virtual funds and check symbol, volume, stops and the journal as new quotes arrive. Stop the exercise if behavior differs from the written rule.
- Write what remains unknown. There is no required profit target or number of demo days that makes live trading safe. Remaining on demo is a valid choice.
XESUN Partners Global is an independent marketing and education resource, not the broker. We may receive commission when an eligible client registers through our referral link and trades. We do not approve accounts, execute trades or hold client funds. This is educational content, not a trading signal or personal investment advice. Leveraged Forex and CFDs carry substantial risk; losses may exceed the initial deposit. No profitability, ranking, registration or successful referral attribution is guaranteed.
About this content
Published by XESUN Partners Global, an independent marketing partner. Educational text and translations are prepared with AI assistance. Official links let you verify broker terms; they are not an endorsement of this website. This content is not personal investment advice.
Forex, CFDs and other leveraged products involve a high level of risk and may not be suitable for every investor. You may lose all or more than your initial deposit. Consider your financial position and experience, and seek independent advice if necessary.
We may receive a commission when an eligible client registers through our referral link and trades. This website is an independent marketing and education resource, not the broker.
References
- MetaQuotes — Strategy Testing: test settings, execution delay and profit-in-pips limitations. · 2026-11-12
- MetaQuotes — Real and Generated Ticks: supplied data, generated data and missing-tick behavior. · 2026-11-12
- MetaQuotes — Strategy Optimization: historical forward period. · 2026-11-12
- MetaQuotes — Testing Report: balance and equity drawdown definitions. · 2026-11-12 · 2026-11-15
- MetaQuotes — Testing Features: mode-specific execution assumptions. · 2026-11-12
- MetaQuotes — CopyBuffer — MQL5 Reference · 2026-11-14
- MetaQuotes — Indexing Direction in Arrays, Buffers and Timeseries — MQL5 Reference · 2026-11-14