Hi all, recently I've been trying to convert my mean reversion algo from daily to minute, and I can't figure out what documentation to reference. The standard functions automatically convert their time periods to minutes instead of days, which isn't very helpful. This is what I have, which slows the backtest to a crawl, and frankly I'm not even convinced it's working properly. Any help would be appreciated.
price_history_10 = history(bar_count=10, frequency='1d', field='price')
price_history_20 = history(bar_count=20, frequency='1d', field='price')
price_history_40 = history(bar_count=40, frequency='1d', field='price')
stock_history_10 = price_history_10[stock]
stock_history_20 = price_history_20[stock]
stock_history_40 = price_history_40[stock]
mavg_10_a = talib.EMA(stock_history_10)
stdev_10_a = talib.STDDEV(stock_history_10)
mavg_20_a = talib.EMA(stock_history_20)
stdev_20_a = talib.STDDEV(stock_history_20)
mavg_40_a = talib.EMA(stock_history_40)
stdev_40_a = talib.STDDEV(stock_history_40)
mavg_10 = mavg_10_a[0]
stdev_10 = stdev_10_a[0]
mavg_20 = mavg_20_a[0]
stdev_20 = stdev_20_a[0]
mavg_40 = mavg_40_a[0]
stdev_40 = stdev_40_a[0]