I was wondering if there was a way to compute an average between two prices of the same security within a very short amount of time. Preferably, I would like to find the average of prices between the most recent two trading prices. I was wondering if there was something along the lines of using
data[context.jblu].price
and then referencing the price that came right before that; but I am not sure how to do this, and I am having trouble finding anything related to this.