Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
multiple open positions - how to close each position?

hi All,
i am playing around with an idea, where i would have multiple open positions (all open via the same set conditions), and wondering whats the best way to close each position?

for example, i have 4 open positions, with pre-determined stoplosses and profits. How do i close each position when stoploss or profit level has been reached? it may be that 4 open positions may not occur where 1st , 2nd or 3rd position would close out earlier. so the 4 open-positions is just example, could be looking at more open position. help please.

thanks,
Chris