so, i thinking this:
Code
for(open_trades)
{
if(condition){
exitLong();
exitShort();
}
}


is the same like
Code
if(condition){
exitLong();
exitShort();
}


Exits all long or all short trades that match the given filter condition (see below), at market or at a given price limit, until the given number of lots is closed.