time series forecasting - sliding window method
Try this:


Make the data stationary (remove trends and seasonality).
Implement PACF analysis on the label data (For eg: Load) and find out the optimal lag value. Usually, you need to know how to interpret PACF plots.
Apply the sliding window on the whole data (t+o, t-o) where o is the optimal lag value.
Apply walk forward validation to train and test the models.


The way to escape sliding window is to use Recurrent Neural Networks but believe me, the method I suggested is worth it. 

If you want the code:
https://machinelearningmastery.com/time-series-forecasting-supervised-learning/

This can help too: Master Thesis research applicable to your question