This post is the main page of documentation of WalkForwardOptimizer library for MetaTrader4/5.
Walk-forward optimization (WFO) is intended for making sure that optimized expert adviser (EA) will most likely keep its performance in future, on unknown data. This is done by running forward test for EA on a so-called out-of-sample data which was not used during optimization on so-called in-sample data, and the process of optimization and testing is repeated multiple times with shifts of the work window in future. Here is an article about walk-forward optimization in Wikipedia.
In this documentation the following terms are used as well:
In-sample data = optimization window
Out-of-sample data = forward test step
If average performance of EA on forward tests remains acceptable, it confirms robustness of EA. Otherwise, either your optimization setup or EA strategy in itself does not provide generalization required to succeed in future, so you need to change something.
MetaTrader does not provide a built-in walk-forward testing (MetaTrader 5 does afford single forward testing, which is rudimentary and far from full-fledged walk-forward analysis). To workaround this limitation one can use the complex of WalkForwardOptimizer library and WalkForwardReporter (WFR) script.