Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
seeking help in implementing 'stop-loss'

Hi all , I tried implementing stoploss in handle_data() function as it samples data each minute and verifies if our stop conditions are satisfied.I'm using rebalance() function to place orders on a daily basis using custom weights.My doubt is before placing orders in rebalance() should I check for open orders and then place ?

I'm a bit confused here because the ordering is taking place both in handle_data() when checking for stop-loss condition and in rebalance() as in regular ordering.