any idea for custom walk forward optimization

 

does anyone know what are the steps on coding an EA that can do walk forward testing optimization just like this one

walk forward optimization - MT5 - Expert Advisors and Automated Trading -  MQL5 programming forum 

I've read article on mql5.com and I found 2 articles but both of them are too complicated for me to understand and the library is expensive but the general idea is

pick the starting date and the end date for the optimization

pick the length of the in-sample data (Ex. 3 Months)

pick the length of the out-of-sample data (Ex. 1 Month)

run the EA on Optimization mode and use the in-sample and out-of-sample data to determine the best parameter for that test

repeat until you reach the end date for the optimization


my guess is that I should use Ontester() Function and date and time to gather the best data and test them on each run till the end of the optimization

to get the most robust parameters for my EA.


i know quite a bit on how to get the parameters on Ontester() Function but how do i implement the out-of-sample data just like in the built in

MT5 Forward Function and repeat the run till the end to get the best settings


maybe I'm wrong about ontester, is there any other way?


what are your thoughts?