Now actually performs FIFO and writes out trades