The WalkForwardOptimizer library allows you to perform step-by-step and cluster forward optimization (walk-forward optimization) of the Expert Advisor in MetaTrader 5.
To use it, you need to include the WalkForwardOptimizer.mqh header file in the ADVISOR code and add the necessary function calls.
When the library is built into the Expert Advisor, you can run optimization according to the procedure described in the User Manual. At the end of optimization, intermediate results are saved to a CSV file and a set of global variables, and a report file is generated in the form of an HTML page.
Attention! Optimization cannot be interrupted – by pressing the Start button (including to resume a previously suspended process), the recording of WF results begins from the beginning. The MQL5 API does not allow you to determine whether a new optimization is being started or the old one is continuing.