The script aggregates total profits and swaps for each pair, which is convenient for hedging accounts and strategies where multiple entries are made based on signals.