Here's an alternative, if it happens to be easier to implement: The date field in the T1 struct is always positive. Maybe an alternative version of the T1 struct can be used, where the date is positive/negative depending on bid/ask, and then the price can be allowed to be negative.