You must somehow store the array until the trade exits. For instance, you could use series for all signals. Then call the advise function at the exit of the trade instead of the entry, and send the signal values from the trade entry bar to the NN.