Yes, you can create a group of trades and the use a 'for each trade' loop for that specific group. That means any trade belonging to any other group will not be considered in the calculation.