Questions:
In onOrderUpdate() i get the order passed in. Is order.Quantity always going to be 5 or will it now be == 3, ie the 3 remaining contrcats?
What about OnExecutionUpdate? There i get passed an Execution object and I get the order from execution.Order. Does that order now have Quantity=5 or Quantity=3 (the 3 remaining).
And if Quantity keeps going down, does that mean when the order is fully filled that Quantity will be 0 and filled will be 5?
Please explain. Thanks.
EDIT: My basic question is this: Suppose I have an original (unmanaged) Order for 5 contracts, and I also have a stop loss order to sell those 5 contracts if the market goes against me. Now suppose that in OnExecutionUpdate() I get notified that I have a partial fill for 2 contract out of the 5, so I want to change my stoploss order from the original 5 contracts down to the remaining 3 contracts. How do I specify the correct quantity in ChangeOrder(stopLossOrder)?
Comment