Save all the indicators/data-lines during the strategy?
I want to dump all the last 20 data-points inside next(). I am running a live-data feed, hence I can't wait to run analyzers.
I could do something like this:
[[self.data.open[i], self.data.high[i], self.data.low[i], self.data.close[i]] for i in range(0, -20, -1)]
Converted to a pandas DataFrame and save to .csv. However I would like all the lines saved, including the indicators and I would like to do it dynamically, so something that could be added to every strategy.