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

Hey guys, I am trying to implement a trading stop loss for my algorithm. It believes it is selling stocks, when it is not actually selling them, so that throws off the leverage. I believe it is not storing any values into the dictionary. I think it is loading up the prices, because when I print(stop) it shows the prices. When I print(context.stop), nothing shows up, except {} with the date 1970. I was using this code, as a basis for my idea. https://www.quantopian.com/posts/using-number-fundamentals-to-identify-uptrending-volatile-small-caps