I don't know of any existing functions that would allow you to do that, but you can do something like the following to operate on only the trades belonging to the current Algo:
Code:
string currentAlgo = Algo;
for(all_trades)
{
    if(strstr(Algo, currentAlgo))
    {
        ...
        do some stuff
        ...
    }
}