MT4 error 138: Requote (ERR_REQUOTE)

The broker offered a new price instead of filling at yours. Nothing was executed; refresh rates and send again.

138ERR_REQUOTE
YesSafe 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.

Your price was no longer available, so the broker answered with a new one. The order didn't open.

Requotes come with instant execution, where the order carries a price and a slippage limit.

Common causes

  • A fast market.
  • A small slippage value.
  • A price read too long before the send.

How to fix it

  • Call RefreshRates() and resend at the new Ask or Bid.
  • Allow more slippage, in points, if you accept it.
  • Cap the number of retries.

Example in MQL4:

int slippage = (Digits == 5 || Digits == 3) ? 30 : 3;   // about 3 pips
int ticket = -1;
for(int i = 0; i < 3 && ticket < 0; i++)
{
   RefreshRates();
   ticket = OrderSend(Symbol(), OP_BUY, 0.10, Ask, slippage, 0, 0, "", 4711);
   if(ticket < 0 && GetLastError() != ERR_REQUOTE) break;
}

Is it safe to retry?

Yes, with a fresh price.

Could the order have executed?

No. A requote is an offer of a new price, not a fill.

How Tickwire handles it

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

Like an MT5 requote, a market order that gets 138 is retried with a fresh price, up to 2 more times.

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.