I am having an odd issue with OnPositionUpdate. I have checked my code and cannot seem to find a way it could be the issue but isn't this so often the case with a bug?
I just want to make certain there isn't a known issue or operating characteristic I don't know about before I spend a lot more time on this.
I am getting a call to OnPositionUpdate with zeros across the board (AvgPrice = 0, flat, quantity = 0) just prior to an execution giving me my first position after previously being flat.
The sequence is: OnPositonUpdate because of an exit taking me flat then an execution giving me a position resulting in a call to OnPositionUpdate with the zero values, then the expected OnPositionUpdate execution showing me with an open position... then after exiting the position, the OnPositionUpdate appropriately showing me flat.
This scenario seems like it has to be in my code but I do not see how. If someone can verify this isn't a known characteristic I will head back to the salt mine of 7 million print statements...
Thanks in advance
Scott

Comment