hi there,


just wondering if there is any solution to this problem: i try to submit a stoplimit order directly after a buy order.  however, it gets rejected by alpaca becuase I cannot submit sell order with a current buy order open.

i just wanna figure out how to delay the stoplimit going in until after the buy is filled so it doesnt get cancelled.


i have tried stuff like(and other similar stuff):

Limitorder(stock, qty, 109.00)

if (ticket.Status == orderstatus.filled);

stoplimit order


but it doesnt work for some reason. any ideas anyone on how to make sure both of these order get submitted?


also, i would like to send my thanks to the Quantconnect team. always helpful, always there. thanks ;)