Hi, with the new Quantopian 2 update the way I make/use custom variables don't work any more. I would have something like this:
for stocks in context.stocks:
# Create variables for each stock
if ('hold_countdown' not in data[stocks]):
data[stocks].hold_countdown = 0
# Update Variables
if data[stocks].hold_countdown > 0:
data[stocks].hold_countdown -= 1
I read in another post about doing something like:
context.s[stocks].hold_countdown = 0
Is that a method I could use or is there a better way of doing this?