I did some experiments and found that this approach is not right. You can not simply nest the all_algos loop with the all_trades loop. (as these loops are not documented, they should not be used in other way than the official examples) Returning back to the original goal: Grouping trades by params can be for example achieved just by using all_trades and TradeVars. See the two examples, why the nesting approach is flawed:

Code
	for(all_algos)
	{
		for(all_trades)
		{
			print(TO_REPORT, "\n%s", Algo);
		}
	}
}


Does not produce output with multiple algo names. It is just stuck on one. Whereas this code does it:

Code
	for(all_algos)
	{
		print(TO_REPORT, "\n%s", Algo);
		for(all_trades)
		{
			continue;
		}
	}