In your article, 2.2 chapters refer to ' An n-step ahead forecast is made sequentially by feeding each prediction back into the network at the next time step'. But you don't seem to be doing this in this program. Did I get it wrong? Hope to get your help.