I guess trades are handled (and therefore also closed) by their unique IDs. Only the strategy that opened a trade knows its ID and can close it or do something else with it. So trades cannot get mixed up.