MT5 error 4302: Symbol is not selected in Market Watch (ERR_MARKET_NOT_SELECTED)

The symbol exists but isn't in Market Watch, so its prices and some properties aren't available. Select it first.

4302ERR_MARKET_NOT_SELECTED
After a fixSafe to retry?
NoCould it have executed?

What it means

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

The terminal only streams prices for symbols shown in Market Watch. Asking for live data on a symbol that exists but isn't selected fails with 4302.

It is easy to fix and common in code that trades many symbols.

Common causes

  • A symbol that was never added to Market Watch.
  • A symbol removed from Market Watch by hand or by another program.
  • A fresh terminal profile with only a default list of symbols.

How to fix it

  • Call SymbolSelect(name, true) before you read prices or trade.
  • In Python, mt5.symbol_select(name, True) does the same.
  • Wait for the first tick after selecting before you send an order.

Example in MQL5:

bool Ready(const string sym)
{
   if(!SymbolInfoInteger(sym, SYMBOL_SELECT) && !SymbolSelect(sym, true))
   {
      Print("Could not add ", sym, " to Market Watch, error ", GetLastError());
      return false;
   }
   MqlTick t;
   return SymbolInfoTick(sym, t) && t.time > 0;   // a price has arrived
}

Is it safe to retry?

Yes, after selecting the symbol.

Could the order have executed?

No. The call failed before any trade.

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.