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

Hi everyone,

Can somebody please show me a way how to make a trailing safe stop.
I know that "handle_data" acts as a loop, but I was struggling with getting a price of a stock from a previous loop iterations.
What would be a good way to go about it?

Thanks.