When I detect my order is fully filled, I call another method to do various things. From within this method, the following sometimes show inaccurate information.
Position.Quantity
Position.AvgPrice
For example, I the order within OnExecution can show a fill count of 80 (and indeed, that should be the position size) when Position.Quantity shows 5.
Waiting until the next OnBarUpdate() and then accessing Position properties seems to avoid the problem.
Is this as it should be, or is it a bug?
Cheers,
saltminer

Comment