MT5 error 10026: Autotrading disabled by server (TRADE_RETCODE_SERVER_DISABLES_AT)
The broker's server doesn't allow automated trading for this account. Nothing was executed; only the broker can change this.
What it means
You see this code in the retcode of a trade result, from OrderSend() in MQL5 or order_send() in Python.
The broker has turned off trading from programs for the account. Manual trades may still work, but requests sent by code are refused with 10026.
It is an account setting on the broker's side. Nothing in the terminal can switch it back on.
Common causes
- An account type that doesn't allow algorithmic trading.
- A broker restriction applied after a review of the account.
- Some contest or special accounts.
How to fix it
- Check
account_info().trade_expert. False means the server doesn't allow automated trading. - Ask the broker to enable it, or move to an account type that allows it.
Example in Python:
import MetaTrader5 as mt5
acc = mt5.account_info()
if not acc.trade_expert:
print("the broker doesn't allow automated trading on", acc.login) Is it safe to retry?
No. It will keep failing until the broker changes the account.
Could the order have executed?
No. The server refused it.
How Tickwire handles it
MT4 runtime error 4112 comes back as 10026.
Related codes
One API for MT4 and MT5
Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.