MT5 Trade Disabled Error: How to Fix It Fast (10017)
MT5 retcode 10017 is a server-side rejection, so restarting the terminal or toggling Algo Trading won't clear it. Use this 60-second triage to find out whether the account, group or symbol is blocked.
This article
8sections 15min
- 01 What You'll Learn, minute 1, about 1 minImagine your EA has been running cleanly all week. On Monday it fires a EUR/USD order and the Experts tab fills with the same red line…
- 02 What does MT5 retcode 10017 'Trade is disabled' actually mean?, minute 2, about 2 minRetcode 10017 means the broker's trade server refused the request because trading is switched off for the account, the account group or the…
- 03 Which code are you seeing? A 60-second triage order, minute 4, about 2 minRead the code first, then follow the branch that matches it. Working in a fixed order stops you from wasting minutes on switches that…
- 04 How do I check whether the symbol or login is the problem?, minute 6, about 2 minOpen the symbol's Specification and read the Trade mode field, then confirm you logged in with the master password. Those two checks…
- 05 Is it really 10027 or 10018 instead of 10017?, minute 9, about 2 minCheck the code once more. If it says 10027, a client-side switch is off. If it says 10018, the symbol is outside its trading session…
- 06 How do I stop an EA looping on a rejected order and what do I tell support?, minute 11, about 2 minLog the retcode, back off for a set time and alert yourself instead of resending. Then, if the checks pass, send support the retcode…
- 07 Conclusion, minute 12, about 1 minThe code tells you the fix path. Retcode 10017 is the server saying no at account, group or symbol level, so toggling Algo Trading or…
- 08 Frequently Asked Questions, minute 13, about 2 minRetcode 10017 is TRADE_RETCODE_TRADE_DISABLED. It means the broker's trade server has switched trading off for your account, account group…
MT5's "Trade is disabled" error is retcode 10017 (TRADE_RETCODE_TRADE_DISABLED): the broker's trade server has switched trading off for your account, account group or symbol. Restarting MT5 or enabling Algo Trading won't clear it. Read the code, check the symbol's Trade mode and your login password, then contact support if needed.
What You'll Learn
- What does MT5 retcode 10017 'Trade is disabled' actually mean?
- Which code are you seeing? A 60-second triage order
- How do I check whether the symbol or login is the problem?
- Is it really 10027 or 10018 instead of 10017?
- How do I stop an EA looping on a rejected order and what do I tell support?
- Conclusion
- Frequently Asked Questions
Imagine your EA has been running cleanly all week. On Monday it fires a EUR/USD order and the Experts tab fills with the same red line, over and over. You restart MT5, retoggle the Algo Trading button, even recompile the EA. Nothing changes. The reason is simple: none of those actions touch the thing that is saying no. Below you'll learn how to read the code, find which of three levels is blocked, and know when to stop troubleshooting and write to support.
What does MT5 retcode 10017 'Trade is disabled' actually mean?
Retcode 10017 means the broker's trade server refused the request because trading is switched off for the account, the account group or the symbol. It is a server decision, so nothing you change inside the terminal can reverse it.
10017 is a server-side rejection
The code is TRADE_RETCODE_TRADE_DISABLED, and MT5 returns it in MqlTradeResult.retcode after a trade request (MQL5 Reference, Trade Server Return Codes). Your terminal sent a perfectly valid request. The server looked at your login, your group's rules and the symbol's settings, and one of them said trading is off.
That is why restarting the terminal or editing EA code does nothing. The EA's logic isn't the problem, and neither is the connection. Think of it like a shop door locked from the inside: pushing harder from the street changes nothing.
10017 vs 10018, 10026 and 10027

Four neighbouring codes get confused constantly:
- 10017: Trade is disabled. The server has switched trading off at account, group or symbol level.
- 10018: Market is closed. The symbol is outside its trading session.
- 10026: Autotrading disabled by the server.
- 10027: AutoTrading disabled on the client side. You fix this in the terminal, not with the broker.
All four are listed in the same MQL5 return-code reference. They look similar on screen and have completely different fixes.
Where to read the code: Journal and Experts tabs
Open the Toolbox (Ctrl+T) and check the Experts tab for EA messages and the Journal tab for terminal and server messages. Read the number, not just the text. Our guide to reading the MT5 Journal and Experts tabs shows how to cross-reference the two.
Common Mistake: Many guides answer this error with "enable AutoTrading". That is the fix for 10027, not 10017. If the log says 10017, the green button is not your problem.
Which code are you seeing? A 60-second triage order
Read the code first, then follow the branch that matches it. Working in a fixed order stops you from wasting minutes on switches that cannot affect a server-side block.
Step 1 to 5: code, symbol, login, session, client switches
- Code. Find the exact retcode in the Journal or Experts tab.
- Symbol trade mode. Open the symbol's Specification and read Trade mode.
- Login password. Confirm you logged in with the master password, not the investor one.
- Session. Check whether the symbol is inside its trading session.
- Client switches. Check the three Algo Trading switches.
Steps 2 and 3 matter most for 10017. Steps 4 and 5 exist to rule out its lookalikes.
The branch table: 10017, 10018, 10026/10027
Markdown tables don't survive publishing, so here is the same branch table as a list:
- 10017: go to the symbol and login checks (steps 2 and 3).
- 10018: go to the session check (step 4).
- 10026 or 10027: go to the autotrading switches (step 5). Remember that 10027 is fixed in your terminal, while 10026 is reported by the server.

Pro Tip: Keep this order as a short note beside your screen. When an error appears mid-session, a fixed order beats improvising.
When the checks run out
If the symbol's Trade mode allows trading, you are on the master password, the session is open and the switches are on, you have exhausted what you can see from the terminal. The only step left is to contact your broker with the code, the symbol and the server time. Account-level and group-level restrictions are invisible from your side, so guessing further just burns time.
For the restricted-symbol side of this error, read MT5 Trade Disabled: Close-Only and Restricted Symbols Explained.
How do I check whether the symbol or login is the problem?
Open the symbol's Specification and read the Trade mode field, then confirm you logged in with the master password. Those two checks explain most 10017 errors you can fix yourself.
Reading Trade mode in the symbol Specification
In Market Watch, right-click the symbol and choose Specification. Find the Trade mode field. If it reads as fully enabled, the symbol itself is not the blocker. If it shows disabled or close-only, the server will reject new positions no matter what your EA does.
A symbol can sit in Market Watch with live quotes and still be disabled for trading. Visible does not mean tradable. If a symbol is missing or not quoting at all, that is a different problem; see MT5 symbol not in Market Watch or no quotes.
The wrong-suffix symbol trap
Many brokers add suffixes to symbol names. For illustration, imagine your EA is hard-coded to send orders on a "EURUSD.pro" variant, but your account only trades the plain "EURUSD" symbol. The suffixed symbol may be visible yet disabled for your account type, and every order comes back with 10017.
Confirm the exact symbol name on your own account, then make sure the chart or EA input uses that name, character for character.
Investor password vs master password
The investor password is read-only. If you logged in with it, you can watch charts and quotes but the server will not let you trade, and the result looks exactly like trade-disabled behaviour. Log out and back in with the master (trading) password, then check the account name in the Navigator to confirm it shows the right login and server.
The MT5 master vs investor password guide explains the access levels in more detail.
Common Mistake: Saving the investor password in the login dialog months ago, then forgetting. The terminal reconnects automatically and everything looks normal until you try to trade.
Is it really 10027 or 10018 instead of 10017?
Check the code once more. If it says 10027, a client-side switch is off. If it says 10018, the symbol is outside its trading session. Neither is a 10017 restriction, and both are fixable by you.
The three Algo Trading switches for 10027

Retcode 10027 means AutoTrading is disabled on the client side and is fixed in the terminal, not with the broker (MQL5 Reference). Three switches must all be on:
- The toolbar Algo Trading button is green (Ctrl+E toggles it).
- Tools > Options > Expert Advisors has "Allow Algo Trading" ticked.
- The EA's own properties (F7, Common tab) have "Allow Algo Trading" ticked.
The button state may not persist after a restart or crash, so re-check it at the start of every session rather than trusting last week's setup.
Why a closed market returns 10018
A symbol outside its trading session returns 10018, "Market is closed", not 10017 (MQL5 Reference). Sessions differ by instrument and are shown in server time, which may not match your local clock. Check the symbol's session times before assuming a restriction. The article on MT5 market closed, symbol sessions, holidays and server time walks through this.
Why a passing OrderCheck() proves nothing
Here is a trap for EA developers. According to the MQL5 reference's own example, OrderCheck() can pass on a closed market, and the following OrderSend() then fails with 10018. A passing check validates the request's shape and your margin, not whether the server will accept the order right now.
Pro Tip: Treat OrderCheck() as a pre-flight sanity test, never as permission. Always read the retcode OrderSend() actually returns.
How do I stop an EA looping on a rejected order and what do I tell support?
Log the retcode, back off for a set time and alert yourself instead of resending. Then, if the checks pass, send support the retcode, symbol, account login, server and server time.
Log, back off and alert instead of resending
An EA that resends a rejected order in a loop floods the journal and can hammer the server. A 10017 will not clear on the next tick, so retrying is pointless. Here is a minimal MQL5 pattern:
if(result.retcode == TRADE_RETCODE_TRADE_DISABLED)
{
PrintFormat("Order rejected: retcode=%u, symbol=%s", result.retcode, _Symbol);
Alert("Trade disabled (10017) on ", _Symbol);
blockedUntil = TimeCurrent() + 300; // pause new orders for 5 minutes
return;
}Before sending any new order, check that TimeCurrent() has passed blockedUntil. If you also see "too many requests" or busy-context messages, MT5 trade context busy and too many requests covers that separate problem.
Account-level restrictions and FXNX account terms
If the symbol and login check out, the restriction may sit at account or group level, which only your broker can see. On FXNX, account terms (commission, markup and swap) can only be changed while the account is flat, with no open positions and no pending orders. The account trades once net deposit covers the minimum for the chosen terms; that minimum is a threshold on net deposit, not a fee. How NX Flex terms work is explained on the product page.
What to send support: code, symbol, server time
A useful message saves a round trip. Include:
- The retcode (10017) and the exact log line
- The symbol name as it appears on your account
- Your account login and server name
- The server time of the rejection

Confirm any account-level restriction with FXNX support using those details. Trading CFDs involves risk of loss.
Conclusion
The code tells you the fix path. Retcode 10017 is the server saying no at account, group or symbol level, so toggling Algo Trading or restarting changes nothing. Work the 60-second order: read the code, check the symbol's Trade mode, confirm the master password login, rule out 10018 by session and 10027 by the three switches. If you run an EA, add logging and back-off so a rejection never turns into a resend loop.
If every check passes, stop troubleshooting and contact support with the code, symbol, server time and account login.
Your next action: open Specification on the symbol that failed and read its Trade mode now, before the next session. FXNX clients can also review their account terms and net deposit position at NX Flex, and terms change while the account is flat.
So which of the three levels, account, group or symbol, is your terminal actually being blocked at?
Frequently Asked Questions
What does MT5 error 10017 "Trade is disabled" mean?
Retcode 10017 is TRADE_RETCODE_TRADE_DISABLED. It means the broker's trade server has switched trading off for your account, account group or symbol, so the request was rejected before reaching the market.
How do I fix MT5 trade disabled error 10017?
Open the symbol's Specification from Market Watch and read its Trade mode, then confirm you are logged in with the master password rather than the investor password. If both are fine, contact your broker with the retcode, symbol and server time.
Will enabling Algo Trading fix retcode 10017?
No. Algo Trading switches relate to 10027, a client-side code. Retcode 10017 is decided on the server, so toggling the button or restarting MT5 does not clear it.
What is the difference between 10017 and 10018 in MT5?
Retcode 10017 means trading is disabled by the server for your account, group or symbol. Retcode 10018 means the market is closed because the symbol is outside its trading session, which is checked by looking at the symbol's session times.
Why did OrderCheck() pass but OrderSend() fail?
OrderCheck() can pass on a closed market, and the following OrderSend() then fails with 10018. A passing check does not prove the server will accept the order.
Trading CFDs involves risk of loss; better terms do not change market risk.
Contents
