Hi

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

  1. self.SetHoldings(A, 0) # sell A
  2. 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

John Munro

September 2023