MT5 error 4753: Position not found (ERR_TRADE_POSITION_NOT_FOUND)

No open position matches the ticket or symbol you named. It may have closed already, or the id is wrong.

4753ERR_TRADE_POSITION_NOT_FOUND
NoSafe to retry?
NoCould it have executed?

What it means

You see this code in GetLastError() in MQL5, after a function fails.

The terminal looked for the position and couldn't find it among open positions. On a hedging account the lookup is by ticket; on a netting account it can be by symbol.

A position that has closed moves to history, so it can't be selected as an open position any more.

Common causes

  • The position was closed by its stop loss, take profit or a stop out.
  • An order ticket or a deal ticket used where a position ticket is needed.
  • A selection by symbol on a hedging account with several positions.
  • A ticket stored from another account.

How to fix it

  • Use PositionSelectByTicket() with the position ticket.
  • If it isn't open, look for it in history with HistorySelectByPosition().
  • Refresh your list of positions before acting on stored tickets.

Example in MQL5:

if(!PositionSelectByTicket(ticket))
{
   if(HistorySelectByPosition(ticket) && HistoryDealsTotal() > 0)
      Print("Position ", ticket, " is already closed");
   else
      Print("No position with ticket ", ticket, ", error ", GetLastError());
}

Is it safe to retry?

No. Find out what happened to the position first.

Could the order have executed?

No. Nothing was done by this call. The position may have closed earlier on its own.

How Tickwire handles it

Tickwire looks the position up before sending a close or modify. If it isn't there, the trade comes back as numericCode 4753 with nothing sent. Read routes answer position_not_found.

Related MT5 Python functions

All MetaTrader error codes

One API for MT4 and MT5

Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.