The close by is a function on the MT5 platforms that allows you to simultaneously close two opposite positions on the same financial instrument and save one spread. The buy order needs to close with a sell order, and the sell order needs to close with a buy order.