MT4 error 5: Old version of the client terminal (ERR_OLD_VERSION)

The broker's server won't accept trades from this terminal build. Update the MT4 terminal and restart it.

5ERR_OLD_VERSION
NoSafe to retry?
NoCould it have executed?

What it means

You see this code in GetLastError() in MQL4, after a trade function fails on the server side.

Brokers can require a minimum terminal build. An older build can sometimes still sign in but is refused when it trades.

The fix is on the terminal side, not in your code.

Common causes

  • A terminal that hasn't updated itself.
  • A copy of the terminal from an old installer.
  • Automatic updates blocked by the network or by file permissions.

How to fix it

  • Update the terminal through the broker's installer and restart.
  • Check the build under Help, About.

Example in MQL4:

int OnInit()
{
   Print("terminal build ", TerminalInfoInteger(TERMINAL_BUILD));
   return INIT_SUCCEEDED;
}

Is it safe to retry?

Not until the terminal is updated.

Could the order have executed?

No. The server won't take trade requests from this terminal build, so nothing was sent on.

How Tickwire handles it

Tickwire treats it like MT5 10006, and the MT4 code stays in the message. See trade results.

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.