The ID is 0 when the trade was not yet opened, f.i.with a pending trade. The tradeVars are all 0 on the first TMF run, but keep their last value when the trade was closed.