As far as I remember and understood it, the machine learning algos use all available data to train on by default. If we got time windows A, B and C, a model is trained on A, a different one on B and another one on C. After that, the strategy is trained on B with the model from A, then the same with C and B. So the models are trained with in-sample data, but the strategy itself is always trained with out of sample data being presented to the trained models. If you are using NEURAL, then you can control the data split etc. within your R script.