These items are AveragePrice, MarketPosition and Quantity.
Assuming e is the PositionEventArgs, and tracing Position Updates as follows:
e.Operation, e.Position.MarketPosition, e.Position.Quantity, "@", e.Position.AveragePrice, "", e.AveragePrice, "➜", e.MarketPosition, e.Quantity
... for a single Order Buy (Forex 1K units) followed by an Exit of that Execution at a different price produces this:
Add Long 1000 @ 0.7145'9 \ 0.7145'9 ➜ Long 1000
Remove Long 0 @ 0.7145'9 \ 0.7145'9 ➜ Flat 0
Grateful for confirmation that this is indeed what is expected. (If not, what does that imply?)
It is somewhat logical to see e.Position.MarketPosition and e.MarketPosition change, although I would have thought that e.Position.MarketPosition in the Add should have been Flat at first.
It is not clear why AveragePrice and Quantity are the same in both updates.
Grateful for an explanation of the exact interpretation of each item in each variation. [The Help documentation is not clear on this.]
Thanks.
Comment