I want to understand the various values that IOrder.OrderState can take and a question on acceptable methods in which to place orders.
- Is it correct that there can only be one value on any OnOrderUpdate() call?
- If so, what is the typical sequence of OrderState on orders that are ultimately Filled or PartFilled?
- After an Order is placed, if it is not cancelled, rejected or unknown, must OrderState.Accepted be true on one pass through OnOrderUpdate() followed by OrderState.Working being true on a subsequent pass before OrderState.Filled or OrderState.PartFilled can be true?
- Are OrderState.Filled, OrderState.Cancelled, and OrderState.Rejected all final after which the OrderState for a given IOrder will never change?
- Is it acceptable to place, modify, or cancel orders within the OnOrderUpdate() method (or, for that matter, within any method other than OnBarUpdate())? If so, is there any additional bookkeeping that must be included in one's logic?
Thank you,
Ken

Comment