Hi

In live trading, what happens when SetHoldings() is invoked repeatedly, but the trade isn't completed. For instance:

self.SetHoldings(A, 0) # sell A
self.SetHoldings(B, 1) # buy B

Does it wait for A to be sold before buying B using the entire portfolio value? What is the canonical approach to wait for the first (sell) instruction to fill prior to calling the second (buy)?

Thanks

Author