I'm trying to creating a minute-by-minute moving average crossover using the 60 and 20 minutes moving averages for the SPY ETF. Experienced C/C++ programmer but new to python and even newer to quantopian/zipline.
My initial thought was to use a .history() after setting my universe to include only the SPY ETF. I was able to figure out how to get the price for each minute for the previous hour, but I can't find a straight answer on how to select a certain amount of previous bars of price data and calculate the mean.
I could use help with this as well as a general guide to using pandas.