I need to have a dictionary with the securities sold and automatically restricting them for 3 day so I don't buy the same and break rules...
Any help would be great.
how to add to this list from the function where i sell. does this needs to be in initialize?
historical_restrictions = HistoricalRestrictions([
Restriction(symbol(stock), pd.Timestamp('2011-01-06 10:00', tz='US/Eastern'), states.FROZEN),
Restriction(symbol(stock), pd.Timestamp('2011-01-06', tz='US/Eastern'), states.FROZEN),
])
set_asset_restrictions(historical_restrictions)