1. Courses
  2. Algo Trading
  3. Lesson 5
Back to CourseBack to Lesson 4
Intermediate12–18 minLesson 5

Truthful Backtests in MT5 — How Not to Fool Yourself

Set realistic data and costs, avoid statistical traps, split IS/OOS correctly, and plan multi-symbol/timeframe tests that actually hold up.

Lesson Progress0%

5.1. Data Quality and Costs: What Must Be Realistic

Garbage in → garbage out. Ensure sufficient, continuous history; set spreads, commissions, swaps, and slippage realistically.

Compounding (reinvestment) changes equity shape; align with your live plan.

Data Quality Auditor

More history captures different market regimes.

Gaps can cause false signals or missed entries.

Scalpers need ticks; swing traders can use OHLC.

Mismatched settings = wrong position sizing results.

Rollover spreads widen; news times vary by broker TZ.

Cost Modeler (Expectancy Impact)

Results

Cost per trade (pips):1.90
Cost per trade (R):0.063
Raw Expectancy (R):0.125
Net Expectancy (R):0.062

Compounding doesn't create edge; it magnifies it.

5.2. Statistical Traps: Bias Lab

Most backtest failures stem from hidden biases. Name them, prevent them, and document safeguards.

Look-Ahead Bias
Data-Mining Bias
Survivorship Bias
Period Fitting

5.3. IS/OOS Splits and Multi-Scenario Planning

Separate optimization (In-Sample) from evaluation (Out-Of-Sample). Test across symbols/timeframes to avoid regime dependence.

IS/OOS Split Planner

Aim IS ≥ 24m, OOS ≥ 6m.

Split: 70/30 | Execution: Next-bar
Multi-Test Matrix

5.4. Practice: Rerun with Realistic Costs and an OOS Window

Step A: Configure realistic costs

Step B: Run IS and OOS

Step C: Compare and export

Sample Reports

Open Sample Report A (optimistic)Open Sample Report B (realistic)

5.5. Report Comparator (A/B Quick View)

Spot the difference: costs, slippage, and IS/OOS separation often turn 'amazing' systems into average ones — that's truth.

MetricReport A (Optimistic)Report B (Realistic Costs)
Net Profit$12,450$4,320
Profit Factor2.851.42
Max Drawdown %8.2%15.7%
Total Trades847821
Expectancy (R)+0.45+0.12
Win Rate68%52%

Lesson 5 Quiz

Test your understanding with 3 questions. Pass with 2/3 correct.

Educational content only. Not financial advice. Trading involves risk of capital loss. Past performance does not guarantee future results.
Back to CourseNext: Optimization & Robustness