I am trying to construct a trading tracker and want to be able to bunch like trades in chronological batches for calculation. So in the example below, I have a series of buy