As you can see a trade can have multiple executions. Just open any trade click plus and select sell for the action. Set the number of units equal to the number of buy units. This will automatically close the trade.
Check the image below to see how to change an execution action.
I hope this helps.