How can I access this order status ? The OrderFilled method has two parameters, position and trade.
public override void OrderFilled(Position position, Trade trade)
Besides, if an order is partially filled, what would be the position.state (open or pending ?) ?
Actually, OrderFilled will be called for partial fills of an order as well as when the order has been completely filled. If the order hasn't been completely filled, the order status will be PartiallyFilled instead of Filled.