You can use Close By to close one order against the other, so the trade is executed with the spread charged only once:
- Double-click one of the positions to open the order window;
- In the "Type" drop-down, select Close By, then select the opposite position in the list below;
- Click the close button.
The two orders offset each other up to the smaller lot size, and any remaining lots stay open. MT4 also offers Multiple Close By, which closes all hedged positions on the same symbol at once; in MT5, this feature is only available on accounts in Hedging mode.