I am currently trying to train a model inside the algorithm environment on a given symbol's daily close, volume and various indicators. Ideally, I want to convert all this data to a dataframe. self.History() provides this data however I can't figure out how to join, say, a 20 day Simple Moving Average onto the dataframe.

Could somebody please advise?