Strategy Walk Forward
Walk Forward analysis applies sequential optimization to the current strategy. The data history is divided into moving windows. Each window has a larger in-sample part that is optimized and a smaller out-of-sample part that is traded with the optimized parameters. The window then moves forward by one out-of-sample step and the process repeats until the whole history has been covered.
The result is a chain of out-of-sample segments: the parameters selected in each stage are tested on data that was not used to select them. This makes Walk Forward a stronger check against overfitting than a single optimization, while still relying on historical data.
The page uses the same Optimizer engine as the Strategy Optimizer. Each segment runs a full optimizer pass over its in-sample data and carries the selected strategy forward to the next segment.
Before You Start
Walk Forward needs enough data to fill several windows. Each window must contain a meaningful in-sample part and a meaningful out-of-sample part. A short history can only produce a few short windows, and short windows make the result noisy.
Use a strategy that already has a credible trading idea and an acceptable backtest. Walk Forward measures how a strategy survives moving from one unseen period to the next; it does not turn a weak strategy into a robust one.
Toolbar
Start and Stop
Click Start to begin the run. The engine optimizes every window in order and carries the selected strategy into the next one. The button changes to Stop while the job is running.
A run continues in the background when you leave the page. While it is running, a red play marker is shown on the Walk Forward tab, so you can follow it from any page; open the page again to see its progress and results. A run keeps the market, account and forex settings, the Data Horizon, the parameters, the window settings, and the validation criteria it was started with, so changing them does not alter a run already in progress.
Progress, Segment, Calculated, and Validated
- Progress estimates how much of the run has been processed.
- Segment shows the window that is currently being optimized, as a count of the planned windows.
- Calculated is the number of candidate backtests performed.
- Validated is the number of finished segments whose out-of-sample result passed the criteria on the Validation tab.
Accept, Clear, and Reset
- Accept makes the last segment's strategy the current strategy and saves its record to the Collection. The record's out-of-sample boundary is the last segment's in-sample/out-of-sample split, so the record carries a real forward window.
- Clear discards the run's results and recalculates the current strategy's preview. It returns to the Parameters tab and keeps the window settings, the parameter rows, and the validation criteria.
- Reset does what Clear does and also restores every window setting to its default and rebuilds the parameter rows from the current strategy, so every parameter is selected again and its Min and Max are re-derived from the default range steps. The validation criteria are kept.
Accept is enabled only after the run has finished all segments. Clear and Reset are disabled while a run is active.
Page Layout
The left column holds four tabs, in the order you use them:
- Parameters is the search spec of the next run: the numeric fields the optimizer may change.
- Settings holds the window geometry, the objective, and the out-of-sample share.
- Validation holds the three criteria lists.
- Statistics holds the per-segment results and the parameter values by segment. It is output rather than input, so it sits last, behind a divider.
Click a tab to open it, or use the arrow keys to move between the tabs; Home and End jump to the first and last tab. The page always opens on Parameters.
The right column keeps the output visible while you work on any tab: the Output figures, the OOS profit by segments table, the Walk Forward chart, the Backtest output, and the Balance chart.
Parameters
The Parameters tab uses the same layout as the Optimizer: three neutral category cards — Strategy features, Entry point and rules, and Exit point and rules — each containing one grouped table. It is the search spec of the next run: one row per numeric field the optimizer can change, with a selection checkbox and aligned Parameter, Current, Min, Max, and Step columns. The rows are grouped under a plain header row per strategy feature or indicator slot. Empty categories are omitted. Narrow panes scroll each table horizontally instead of squeezing its inputs.
Each card heading shows its selected count and a Toggle button. Toggle clears the category when most rows are selected; otherwise, including an exact half, it selects all. Card titles and group header rows are plain labels, so clicking them never changes a selection.
The list covers the numeric fields of the enabled strategy features (Stop Loss and Take Profit included), the entry point and rules, and the exit point and rules. Uncheck a row to leave that field out of the run. The Apply button on the Settings tab fills every row's minimum and maximum from its current value and its own step, and you can also type any range directly. Step can be decreased to the field's permitted precision, not only increased from its current value.
Every window searches the same ranges, so the segments are directly comparable. A parameter whose selected value keeps ending up at the edge of its range is telling you that the range is too narrow; widen it and run again.
The Parameters tab describes the next run. Once a run has started, the values the selected strategy held in each segment are reported on the Statistics tab, so editing the rows never rewrites a finished run's results.
Settings
The tab groups the window geometry, the optimizer options, and the data split.
Segments
The number of moving windows, from 1 to 12; the default is 5, a common starting point. More segments test the strategy in more separate periods, but each window becomes shorter for the same data history.
Search Best
The objective the optimizer maximizes inside each segment. The default is Net profit. The available objectives match the Optimizer:
- Net balance
- Return to drawdown
- System quality number
- Win/loss
- Sharpe ratio
- Profit factor
- Net profit
- R-squared
- Max stagnation
Choose an objective that matches the strategy's purpose rather than the one that produces the largest historical improvement.
Default Range Steps
The half-width of every parameter range, expressed in steps around the parameter's current value; the default is 20, and the allowed range is 1 to 1000. Press Apply to write that range into the Min and Max of every row on the Parameters tab: each range is centered on the parameter's current value, advances by the parameter's own step, and is clamped to the field's own limits. Applying replaces Min and Max values edited by hand, but never changes the Step column. Larger values widen the search and increase the number of calculations.
Out of Sample
The share of each window reserved for out-of-sample testing, from 5% to 50% in steps of 5%; the default is 30%. The remaining part of the window is used in sample. This value also controls how far the window moves forward each step: the step is one out-of-sample part. The tab shows the resulting in-sample and out-of-sample window lengths in days for the selected market and period.
The toolbar's Reset button restores every option on this tab to its default. Use Clear to discard the results only and keep the tab's options.
Changing a setting does not rewrite a finished run's results: the page keeps showing the windows the run was started with. Start a new run to use the new settings.
Validation
The Validation tab has three independent criteria lists:
- Full data is checked against the full-data backtest of the final segment's strategy.
- In sample is checked inside every segment and gates which candidates the optimizer may select.
- Out of sample decides whether a completed segment counts as validated. The toolbar's Validated figure and the Statistics table use this list.
Use Add criteria to add a metric and its limit. A criterion can require a minimum value, such as minimum net profit, or impose a maximum, such as maximum drawdown or maximum stagnation. Remove a criterion with its remove button, or restore a list to its defaults with the reset button next to Add criteria.
The defaults are minimum net profit 10 and at least 100 trades for Full data, and minimum net profit 0 for In sample and Out of sample. An empty list sets no requirement, so an empty Out of sample list counts every finished segment as validated.
Statistics
Segments performance has one row per planned window, numbered from 1. A row fills in when its segment completes; until then its figures are dashes. Each row reports the out-of-sample result of the selected strategy in that segment:
- the out-of-sample start and end time,
- net profit,
- maximum drawdown,
- return to drawdown,
- count of trades,
- system quality number,
- win/loss ratio,
- and Valid. — Pass or Fail, from the out-of-sample criteria.
Click a column header to sort by it; click it again to reverse the direction. Numeric columns start with the largest value first.
Consistency across segments matters more than a single strong segment. A strategy that passes in most windows, with comparable profit and drawdown figures, is more credible than one carried by an exceptional period.
Below it, Parameter values by segment reports the value the selected strategy held for every optimized parameter in each segment. It uses the same grouped layout as the Parameters tab: one header row per strategy feature or indicator slot, then its parameters, with the original value and one column per segment. A value that differs from the original is highlighted. This is where you see how far the search moved the parameters from window to window.
Walk Forward Chart
The chart sits in the output column, below the output and per-segment profit tables and above the Backtest output, so it stays visible while you work on any tab. It draws two lines over the window region, starting with the first window's in-sample part:
- The Original line is the current strategy's equity.
- The Walk forward line starts with the first window's in-sample equity (the original strategy, which every walk starts from) and then chains each segment's out-of-sample equity onto the previous segment's ending value, so it shows the simulated result of trading the strategy as it was progressively re-optimized.
The staircase below the chart has one row per window, the first window at the bottom. The blocks follow the legend: the cooler block is the in-sample part used for optimization and the warmer block is the out-of-sample part that was tested. A dashed vertical line marks the start of each out-of-sample part.
Read the chart for survival, not for a smooth ending value. A walk-forward line that repeatedly gives back gains, goes flat, or depends on one lucky segment is a warning even when it ends higher than the original.
Output
The output column shows:
- Output: Segments on profit and Cumulative OOS profit count the finished segments. Full data criteria says whether the final strategy passes the full-data criteria list, and Is strategy better says whether the final strategy's Search best objective on the full backtest beats the original strategy's.
- OOS profit by segments: per segment, the original strategy's out-of-sample profit, the profit after that segment's optimization (column Optimized), and the Gain between them.
- Backtest output: the selected statistics with the gain over the original. Until the run completes, the value column repeats the original backtest and the gain is a dash.
- Balance chart: the original strategy's balance and the final strategy's full-data balance. The dashed line marks the last segment's out-of-sample start, so the region to its right is the final unseen window.
Recommended Workflow
- Run a normal backtest and record the original statistics.
- Choose a segment count and an out-of-sample share that fit the available history.
- Set a modest Default range steps value and press Apply so each segment searches a realistic neighbourhood of the current values; uncheck the parameters that must not change.
- Choose a Search best objective that matches the strategy's purpose.
- Configure the in-sample and out-of-sample criteria with non-negotiable requirements.
- Start the run and follow the segments; stop early when the direction is clear.
- Review the equity chart, the per-segment statistics, and the parameter drift before accepting.
- Accept the final strategy only when its segments are consistent and its full-data result remains plausible.
- Re-test the accepted strategy on other data or markets before treating it as ready for live use.
Common Problems
Start is disabled
The selected market does not contain enough bars for the requested number of segments and out-of-sample share, or no parameter row is selected. Reduce the segment count, reduce the out-of-sample share, use a longer data history, or select a parameter row on the Parameters tab. The page shows the exact reason above the tabs.
Few segments pass validation
The strategy may not survive unseen periods, or the criteria may be too strict. Check the per-segment statistics before relaxing the criteria: consistent losses out of sample are a finding, not a configuration problem.
The walk-forward line looks better than the original
Compare the segment count and each segment's figures. A result driven by a few segments is weak evidence. Check whether the optimized parameters drift to very different values in every segment, which suggests the optimizer is chasing noise.
The parameters barely change
The ranges may be too narrow or the in-sample data too short. Increase Default range steps and press Apply, or use fewer, longer segments.
The result disagrees with the Optimizer
The Optimizer searches once and compares the candidates on the full backtest. Walk Forward re-optimizes each window's in-sample part and then tests the next unseen window, so a strategy that looks strong in a single optimization can fail when the window moves.