For some reason on Order::OrderClose, we're losing value for request.position, and MT5 opens the new order, instead of closing the existing one. It's a side effect of using ambiguous TRADE_ACTION_DEAL action in MT5 for both opening and closure of the orders/positions/trades/whatever, this didn't happen when closing tickets in MT4, because it was much clearer. Using ambitious action for both operations only increases risk that it can happen again.
For some reason on Order::OrderClose, we're losing value for
request.position
, and MT5 opens the new order, instead of closing the existing one. It's a side effect of using ambiguous TRADE_ACTION_DEAL action in MT5 for both opening and closure of the orders/positions/trades/whatever, this didn't happen when closing tickets in MT4, because it was much clearer. Using ambitious action for both operations only increases risk that it can happen again.