MT4 error 135: Price changed (ERR_PRICE_CHANGED)

The price moved before the order could be filled. Nothing was executed; refresh rates and send again with the new price.

135ERR_PRICE_CHANGED
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.

The market moved away from your price while the request was in flight. Your price was valid when you read it, but not when the request arrived.

It is a normal answer in fast markets.

Common causes

  • A stale Ask or Bid value.
  • A slippage of 0 or 1 point.
  • News or thin liquidity.

How to fix it

  • Call RefreshRates() and resend with the current price.
  • Allow a sensible slippage for the symbol.
  • Decide again whether the trade still makes sense at the new price.
  • Retry a few times at most.

Example in MQL4:

int ticket = -1;
for(int i = 0; i < 3 && ticket < 0; i++)
{
   RefreshRates();
   ticket = OrderSend(Symbol(), OP_BUY, 0.10, Ask, 5, 0, 0, "", 4711);
   int err = (ticket < 0) ? GetLastError() : 0;
   if(err != ERR_PRICE_CHANGED && err != ERR_REQUOTE) break;
}

Is it safe to retry?

Yes, with a fresh price.

Could the order have executed?

No. The price moved, and the order was refused at the old one.

How Tickwire handles it

Tickwire treats it like MT5 10020, 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.