Anyone know what I'm doing wrong here. I'm gettin the error in the: "def run_this" section
def initialize(context):
context.securities = [sid(24), sid(5061)]
for i in range(15, 390, 1): # start, stop, every n minutes, where n is 1 in this case
schedule_function(run_this, date_rules.every_day(), time_rules.market_open(minutes=i))
def run_this(context, data):
for s in context.securities:
hist = data.history(context.securities, 'volume', 11, '1m')
vol_10 = hist[0:9].sum()
vol_1 = hist[10]*3.5
It's looking at previous history bars and running calculations, but i get an error.
Thanks!