I found a money bug in my own trade-cost auditor: a trade that had been reversed could vanish from its per-trade report. The defect was real. The fix is in the source, and the build I ship today carries it.
On a netting account, reversing a position is one deal that closes the running side and opens the opposite one. My auditor wrote that deal's whole volume to both sides. The side it opened never reached its own opening volume, so it never closed and was skipped, and with the magic filter off it was not counted either. Its profit, commission, swap and fees were missing from every total.
Hold 1.00 long and sell 2.00. The deal carries 2.00, which is 1.00 to close and 1.00 to open. The old code wrote 2.00 to each side, so it accounted for 4.00.
If you trade a netting account, reverse one position and check that the trade it opened appears in the per-trade report at all, because no total will tell you that one is missing.


