Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
KeyError

KeyError: Equity(4417 [LEN])

USER ALGORITHM:156, in set_trailing_stop_long

context.stop_loss[context.stock] = max(context.stop_loss[context.stock], 0.985 * price)

Getting a KeyError when trying to set a stop loss. Any help is appreciated