What is walk-forward, and why is it more honest than a single optimisation?
Optimising picks the parameters that did best in the past; walk-forward tests them on data they have not seen, stretch by stretch. What does MT5 ship with? What to look at when it is done, what the method does not fix, and what to ask of a report.

Walk-forward optimises a strategy on a window of the past, tests it on the next stretch, which took no part in the optimisation, and repeats the process while sliding the window forward. What gets judged is the sum of those test stretches, never the optimised window. That way the question stops being which parameters would have been best and becomes whether the chosen parameters still work when data they have not seen arrives.
What problem does it solve?
Optimising means trying many parameter combinations over a period and keeping the one that did best. That combination's result is, by construction, the best of that period: it was chosen precisely for being so. Part of that result may be a real edge, and part may be noise the parameters learned to exploit.
From inside the optimised period there is no way to tell the two apart. That is the mechanism we explained in why a perfect backtest fails in live trading, and the reason the metrics that matter only mean something on data the optimisation never touched.
Walk-forward does not remove the noise. What it does is force the strategy to show, stretch by stretch, that what it learned holds up outside the sample.
How does it work, step by step?
A 2017 article published on MQL5.com, the MetaTrader 5 (MT5) programming community, describes it with three measures: the total period, the optimisation window and the test step. The window has to be much larger than the step, and the total period larger than the window.
- Optimise the strategy using only the data in the first window.
- Test those parameters on the following step, without touching them.
- Slide the window one step forward and repeat, until you reach the end of the period.
- Join the results of all the test steps. That is the curve that counts.
An example to fix the idea: with two-year windows and two-month steps, a four-year period gives twelve test stretches, all with parameters chosen before seeing them. The article gives that same layout as its example: a period holding one window and a dozen steps.
What does MT5 ship with?
The Strategy Tester has an option called Forward. According to its official help, it splits the period in two — a half, a third, a quarter or a date you choose — optimises on the first part and tests the best results on the second: the top 10% in the complete search and the top 25% with the genetic algorithm. The two results are compared on separate tabs.
This option enables the verification of optimization results using a preset forward period in an effort to avoid overfitting in optimization time intervals.
It is a good step, but it is a single cut. Walk-forward is many successive cuts. The 2017 article put it like this:
Unfortunately, the built-in MetaTrader tester does not allow launching it at the touch of a button. Instead, we have to automate the tester launch using external tools and stick forward test reports together.
As of September 16, 2026, the MT5 optimisation help still describes the single cut and does not mention walk-forward. Applying it in MT5 means chaining several tests, by hand or with libraries and tools of your own, and MQL5.com carries articles and libraries devoted to it.
What do you look at when it is done?
First, the curve of the test stretches, not that of the windows. It is the only part of the result the optimisation could not fit.
Second, how much is lost on leaving the sample. Another MQL5.com article, from July 2026, sums it up in a ratio it calls walk-forward efficiency, which it defines as out-of-sample Sharpe divided by in-sample Sharpe, stretch by stretch. Close to 1, the parameters kept their performance. Close to 0, the in-sample performance was largely artificial. Negative, the parameters turned around.
Third, how the parameters change from one window to the next. If the optima jump around with no pattern between neighbouring windows, what the optimisation found in each one looks more like that stretch's noise than like a rule of the market. As with Sharpe in general, these figures are for comparing, not for certifying.
What does walk-forward not fix?
- The simulator's assumptions. Every stretch is tested with the same tick model, the same spread handling and the same execution. If those assumptions inflate the result, they inflate it in every stretch.
- Picking the walk-forward that looks best. If you try many window and step combinations and show the best one, you have optimised again, this time over the method itself.
- Small samples. Twelve stretches with few trades each say less than they seem to.
- Real time. It is still a test on the past. Forward testing on a demo or live account is the next rung, not something walk-forward replaces.
What should you ask of a report that says "walk-forward"?
- The size of the window and of the step, and how many test stretches come out.
- The result of each stretch, not just the total.
- The parameters chosen in each window.
- Whether that setup was fixed before looking at the results, or adjusted until the report came out well.
What this article does not tell you
It does not propose window or step values for any strategy, we have not run a walk-forward of our own for this piece, and it does not evaluate any of the libraries that exist to do it in MT5.
Nor does it present it as a guarantee. It is the method Robert Pardo develops in The Evaluation and Optimization of Trading Strategies (Wiley, 2008), and its value is not that it predicts anything: it is that it forces a strategy to prove its edge on data it did not choose.






