MT5 EA Not Trading? How to Find the Cause and Fix It
Published November 18, 2026 · Updated November 18, 2026 · In Trading Guides
An MT5 EA not trading usually has one of four causes: automated trading is switched off somewhere, the account or server does not allow it, the broker rejects the order, or the EA’s own rules have not produced a signal yet. MetaTrader 5’s logs usually show which one, so the fastest fix is to read them before you change any settings or code. Every platform fact below comes from MetaQuotes’ MT5 help and the MQL5 reference, checked on 18 November 2026.
On this page
Quick checks for an MT5 EA not trading
Start at the top. Each step rules out one layer, from the terminal down to the strategy itself.
- Is the Algo Trading button on the toolbar switched on?
- Does the EA’s own Common tab allow it to trade?
- Does the Experts or Journal tab show an error or a return code?
- Did you log in with the master password, not the investor password?
- Is the symbol open for trading, and do the lot size and stops fit its rules?
- Does the EA open trades in the Strategy Tester on the same symbol and timeframe?

The Algo Trading switches
MT5 has a global switch and a per-EA switch, and both must be on. The global one is the button on the main toolbar. Depending on your terminal build it reads Algo Trading or AutoTrading, and the MT5 help uses AutoTrading. The same setting sits in Tools, Options, Expert Advisors. When it is off, EAs still run and analyse prices, but they cannot place trades.
The per-EA switch lives in the EA’s properties. Open them, go to the Common tab and tick the box labelled Allow Algo Trading or Allow Auto Trading, depending on the build. Once the EA is running, an icon next to its name in the chart’s top right corner shows whether its trading is enabled or disabled.
Three more boxes on the Expert Advisors options tab can explain an EA that traded yesterday and stopped today. MT5 can disable automated trading when you switch accounts, when you switch profiles, and when you change the chart’s symbol or period. An MT5 EA not trading right after one of those actions has most likely hit this option. Switching the global button back on fixes it.
Read the Experts and Journal tabs
Both logs are in the Toolbox window at the bottom of the terminal. The Experts tab shows what your EAs and indicators report, including orders they open or close, alerts and comments. The Journal tab records platform events for the session, trade operations included.
Read the newest lines first, then scroll back to the moment you attached the EA. Three patterns tell you where to look next:
- An order line followed by a failure and a code. The server refused the request, and the code says why.
- A message that the EA stopped, or “Expert Advisor stopped”. The EA did not start at all, often because of a DLL setting (see below).
- No lines from the EA after it loaded. The EA has not tried to trade, which points to its entry rules.
A silent log means the terminal let the EA run and nothing refused an order. An MT5 EA not trading in that state is usually waiting for an entry condition that has not happened yet.
Return codes for a rejected order
A rejected order is the easiest kind of MT5 EA not trading to diagnose, because the server says why. Each answer carries a return code. The texts below are copied from the MQL5 list of trade server return codes. Our own reading of each one is in the “What to check” column.
| Code | MetaQuotes text | What to check |
|---|---|---|
| 10027 | Autotrading disabled by client terminal | The Algo Trading button or the EA’s Common tab box |
| 10026 | Autotrading disabled by server | Ask the broker whether EAs are allowed on this account |
| 10017 | Trade is disabled | The symbol’s trade mode and your account type |
| 10018 | Market is closed | The symbol’s trading session |
| 10019 | There is not enough money to complete the request | Lot size against free margin |
| 10014 | Invalid volume in the request | Minimum lot, maximum lot and lot step |
| 10016 | Invalid stops in the request | Stop loss and take profit distance from the price |
| 10030 | Invalid order filling type | The filling mode the EA sends |
| 10044 | The request is rejected, because the “Only position closing is allowed” rule is set for the symbol | The symbol is close-only for now |

Account and server permissions
The MQL5 page on trade permissions lists four separate checks: the terminal, the program, the trade server’s rule for EAs, and the account itself. Only the first two live in the terminal’s settings.
A broker’s server can forbid automated trading for an account. In that case AccountInfoInteger(ACCOUNT_TRADE_EXPERT) returns false and orders come back with 10026. Nothing in your terminal changes it, so the broker has to answer.
The account can also be closed to trading entirely. MetaQuotes lists the reasons: no connection to the trade server, an account in read-only mode because it was archived, trading disabled on the server, or a login with the investor password. The investor password gives read-only access, and the Journal shows a line in this form:
'<login>': trading has been disabled - investor mode
An investor login is an easy cause of an MT5 EA not trading to miss, because charts and prices look normal. Log out and connect again with the master password.

Symbol rules: trade mode, volume, stops, filling
Each symbol carries its own rules, and an EA written for one broker can break them on another. You can read them in the symbol’s specification, or in code with SymbolInfoInteger and SymbolInfoDouble.
- Trade mode. SYMBOL_TRADE_MODE can be disabled, long only, short only, close only, or full (“No trade restrictions”). A buy-only EA on a short-only symbol never opens anything.
- Volume. SYMBOL_VOLUME_MIN, SYMBOL_VOLUME_MAX and SYMBOL_VOLUME_STEP set the allowed lots. A lot of 0.015 fails when the step is 0.01.
- Stops. SYMBOL_TRADE_STOPS_LEVEL is the minimum distance in points between the current price and a stop order. Stops placed closer than that return 10016.
- Filling. SYMBOL_FILLING_MODE holds the allowed filling flags, such as FOK (fill the whole volume or nothing) and IOC (fill what is available, cancel the rest). Sending a type the symbol does not allow returns 10030.
Symbol names cause a different kind of failure. A broker may add a suffix, as in EURUSD.m, and an EA with a fixed name then finds nothing to trade. Have it use the chart’s own symbol (_Symbol) unless it truly needs another.

DLL and WebRequest permissions
EAs that call a DLL or fetch web data need permissions MT5 keeps off by default.
If an EA imports a DLL and DLL use is not allowed, it stops with “Expert Advisor stopped” in the Journal. It stays stopped until you reinitialise it, for example by allowing DLL imports in its properties and clicking OK. Tools, Options, Expert Advisors sets the default for new EAs. MetaQuotes advises enabling DLL imports only for programs you trust.
For WebRequest(), every server the EA talks to must be on the list under Tools, Options, Expert Advisors, “Allow WebRequest for listed URL”. If the address is missing the call returns -1. WebRequest() also does not run in the Strategy Tester, so an EA that depends on it can behave differently in a test.
A start-up check in MQL5
A well-written EA reports its own permissions when it starts, so the Experts tab answers most questions before you ask them. Here is a minimal OnInit() that prints each check from the sections above. It uses only standard MQL5 functions; treat it as an example to adapt, not tested production code.
// MQL5: print every trading permission once, when the EA starts
int OnInit()
{
Print("Terminal Algo Trading allowed: ", TerminalInfoInteger(TERMINAL_TRADE_ALLOWED));
Print("Terminal connected: ", TerminalInfoInteger(TERMINAL_CONNECTED));
Print("This EA may trade: ", MQLInfoInteger(MQL_TRADE_ALLOWED));
Print("Server allows EAs: ", AccountInfoInteger(ACCOUNT_TRADE_EXPERT));
Print("Account may trade: ", AccountInfoInteger(ACCOUNT_TRADE_ALLOWED));
Print(_Symbol, " trade mode: ",
EnumToString((ENUM_SYMBOL_TRADE_MODE)SymbolInfoInteger(_Symbol, SYMBOL_TRADE_MODE)));
return(INIT_SUCCEEDED);
}
The second habit is logging every order result. According to the OrderSend() reference, a true return only means the request passed a basic check. It does not mean the trade went through, so the EA must read result.retcode:
// MQL5: send a prepared request and always log the server's answer
bool SendAndLog(MqlTradeRequest &request)
{
MqlTradeResult result = {};
if(!OrderSend(request, result))
PrintFormat("OrderSend failed, error %d", GetLastError());
PrintFormat("retcode %u: %s", result.retcode, result.comment);
return(result.retcode == TRADE_RETCODE_DONE || result.retcode == TRADE_RETCODE_PLACED);
}
With both pieces in place, the Experts tab records every refusal and its code, so diagnosing an MT5 EA not trading starts with one log line. MetaQuotes also recommends checking a request with OrderCheck() before you send it.
When the EA simply has no signal
If the switches are on, the account can trade and the log shows no errors, the EA is probably working as written. Time windows, spread limits, trend filters and news filters can all block entries for days. A rule such as one trade at a time can also see an older position, perhaps one opened by another EA with the same magic number, and wait.
The cheapest test for an MT5 EA not trading in this state is a Strategy Tester run with visual mode, on the same symbol, timeframe and inputs. If it trades there and not on the live chart, go back to the account, symbol and broker checks. If it does not trade in the tester either, the logic or the inputs need work. Our guide to MT5 backtesting covers tester settings such as the modelling mode.

Still stuck with an MT5 EA not trading after every check? If you have the .mq5 source, a developer can add the start-up check and order logging above, then read the cause from the log. A compiled .ex5 file cannot be edited, so for a bought EA ask its seller first. For a custom fix or rebuild, see our MT5 EA development service or send us the EA and its Journal log on WhatsApp for a fixed quote.
New to EAs? Read what an Expert Advisor is first, or compare the two platforms in MT4 vs MT5. Setting messages and menus come from the MetaTrader 5 settings help.
MT5 EA not trading: FAQ
What does “Autotrading disabled by client terminal” mean?
It is return code 10027. Automated trading is off in your own terminal, either on the Algo Trading button or in the EA’s Common tab. Turn both on and the next order can go through.
Why did my EA stop trading after I changed the chart timeframe?
A setting in Tools, Options, Expert Advisors turns automated trading off whenever a chart’s symbol or period changes. Switch Algo Trading back on, or untick that setting if you change timeframes often.
Can an EA trade if I logged in with the investor password?
No. The investor password gives read-only access. The Journal shows a line ending in “trading has been disabled – investor mode”. Log in again with the master password.
Why does the EA trade in the Strategy Tester but not on my live chart?
A live chart depends on things a test run does not. Check the Algo Trading switches, the account permissions, the symbol’s trade mode and lot rules, and any WebRequest() calls, which do not run in the tester.
Does an EA keep trading when I close MT5?
No. An EA runs inside the terminal, so it stops when MetaTrader 5 closes or the computer sleeps. To trade around the clock, the terminal has to keep running on a machine that stays on.
Risk warning: Trading forex, CFDs and other leveraged products carries a high risk of loss. An EA that places trades correctly can still lose money, and automated trading does not remove market risk. Test any EA on a demo account first. This article is for education only and is not investment advice.
Want this built for you?
We develop it as a service — reliable, tested, and yours to own.
Message Us on WhatsApp