Closed rterp closed 7 years ago
Ok, this issue has been fixed. The problem is that the Ticker object contains a NumberFormat, and was using this object in its equals() and hashcode() methods. When an order is placed, the order is serialized to a file for persistence. Apparently the process of serializing the NumberFormat changes its hashcode, thus changing the hashcode of the Ticker. I've removed the NumberFormat from the calculation of the Ticker object and it seems to be working now.
It appears IB Order Events are modifying ticker objects which is causing anything that uses ticker.equals() to return false after an order event is fired, when before the order event the equals() method would have returned true.