MT5 error 10025: No changes in request (TRADE_RETCODE_NO_CHANGES)
The modify request asked for the values the order or position already has. Nothing needed to change, so it counts as success.
What it means
You see this code in the retcode of a trade result, from OrderSend() in MQL5 or order_send() in Python.
You asked to set stops or a price to the values they already have. The server has nothing to do, so it says so with 10025.
This isn't a failure. The order or position is already in the state you asked for.
Common causes
- A trailing stop routine that sends the same stop again.
- Rounding that turns a small change into no change.
- A retry of a modify that already worked.
How to fix it
- Compare the new values with the current ones, after rounding, and skip the call if they match.
- Treat 10025 as success in your code.
Example in Python:
import MetaTrader5 as mt5
pos = mt5.positions_get(ticket=ticket)[0]
digits = mt5.symbol_info(pos.symbol).digits
new_sl = round(new_sl, digits)
if new_sl != round(pos.sl, digits):
r = mt5.order_send({"action": mt5.TRADE_ACTION_SLTP, "position": pos.ticket,
"symbol": pos.symbol, "sl": new_sl, "tp": pos.tp})
ok = r is not None and r.retcode in (mt5.TRADE_RETCODE_DONE, mt5.TRADE_RETCODE_NO_CHANGES) Is it safe to retry?
No need. The state is already what you asked for.
Could the order have executed?
Not a trade. Nothing needed to execute. The values were already in place.
How Tickwire handles it
Tickwire counts 10025 as success and reports outcome no_change. See outcomes.
MT4 error 1 on a modify, which means the same thing, comes back as 10025.
Related codes
One API for MT4 and MT5
Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.