Oh yes, I knew that about phantom trades but I had forgotten in trying to track down this issue.

There is definitely some issue, but perhaps then only the first bullet point above: returning 0 for NumOpenLong, NumOpenShort, NumOpenTotal when in fact there are live trades open.

I'm having trouble assembling a simplified example to demonstrate the problem, but I'm sure I'll get one soon. (Either that, or I'll figure out what I'm doing wrong to cause the issue!!)