Expert Advisor Not Trading in MT4 or MT5: A Step-by-Step Diagnostic Checklist

日本語 / English

An Expert Advisor (EA) that is attached to a chart but places no orders usually falls into one of four states: it is not running, it is running but not allowed to trade, it tried to trade and was refused, or it is running and simply waiting for its entry condition. Work through the states in that order, and read the log before you change any setting; changing several settings at once makes it hard to tell which one mattered.

This checklist covers the desktop versions of MetaTrader 4 (MT4) and MetaTrader 5 (MT5). It is based on the MetaQuotes documentation, checked on 2026-10-10; menu names, button labels and icons can differ between builds and languages, so confirm each item on your own terminal. It does not recommend any EA, broker or service, and it does not suggest that an EA will earn a profit.

Quick answer

  1. Is the EA attached and alive? Look at the top-right corner of the chart for the EA name and its status icon.
  2. Is it allowed to trade? Four separate layers can each block trading: the terminal-wide setting, the per-EA setting, a protective option that switches trading off when you change something, and a restriction on the account or server side.
  3. Did it try and get refused? Open the Experts and Journal logs and look for an error message with a time that matches the moment you expected a trade.
  4. Is it just waiting? An EA only acts when its own conditions are met, and only when new price ticks arrive.

1. Sort the problem into four states

StateWhat you typically seeWhere to look first
A. Not runningNo EA name in the corner of the chart, or the EA was replacedChart corner, Navigator (Section 2)
B. Running, not allowed to tradeEA name is shown, but the status icon differs from the normal one; the EA may log a "trading not allowed" error when it tries to trade, or log nothingThe four permission layers (Section 2)
C. Order refusedAn error message appears in the Experts or Journal log at the expected timeLogs and the error table (Sections 3 and 5)
D. WaitingNo errors, no refusals; the EA's own conditions are not met, or no new tick has arrivedInputs, market state and the EA's documentation (Sections 4 and 6)

Only one EA can run on a chart. If you attach a second EA to the same chart, the first one is removed, so check that the EA you expect is the one still attached.

2. The four permission layers

Trading by an EA must be allowed at every layer. If one is closed, the EA can stay attached and keep running but cannot send orders.

LayerMT4MT5
1. Terminal-wideTools → Options → Expert Advisors, option "Allow automated trading", or the automated-trading button on the toolbar. If it is disabled, scripts and EAs still work but cannot trade.The toolbar button, shown as "Algo Trading" in an MT5 build observed on 2026-10-10 and called "AutoTrading" in the MetaQuotes help (labels can differ by build and language), and the equivalent option under Options → Expert Advisors. If it is off, no EA can trade, even if trading is enabled in the individual EA settings.
2. This EA onlyIn the EA properties, Common tab, "Allow live trading". Even if it is on, the terminal-wide setting can still block trading.In the EA properties, "Allow Auto Trading". The Navigator lists the running EAs with an icon that shows whether each one may trade, and its context menu can enable or disable trading per EA.
3. Protective optionsOptions can switch automated trading off automatically when the account, the profile, or the chart's symbol or period changes.The same three protective options exist under Options → Expert Advisors. MT5 also has an option that disables trading through the external Python API; it applies to Python scripts that connect to the terminal from outside.
4. Account or server sideError 4112: "Automated trading by Expert Advisors/Scripts disabled by trade server".Return code 10026: "Autotrading disabled by server".

Layers 1 to 3 are on your terminal. Layer 4 is not: if the log shows the server-side message, no terminal setting can change it, and the next step is to ask the operator of your trading account.

Status icon. According to the MT4 help, an attached EA shows its name with a smiley face, and when live trading is disabled in the EA settings the smiley is replaced by an "L"; and a separate marker, which the help calls a dagger, means that all EAs are disabled. In MT5, the help says that a changed icon means the EA is not allowed to trade, and tells you to enable automated trading both in the EA settings and in the platform options. Icon shapes may differ in your build, so compare the icon with how the same EA looked when trading was allowed.

Protective options explained. If you change the timeframe or symbol of a chart, switch accounts, or switch profiles while the matching protective option is on, the EA's permission is switched off. This is one possible reason why an EA that worked yesterday places nothing today. After any of those changes, recheck Layers 1 and 2.

3. Read the logs: Experts versus Journal

Both platforms keep two logs. Use them together.

LogWhat it recordsTypical use
ExpertsInformation about the attached EA (in MT5, also running indicators): opening and closing of positions, order modifications, and the program's own messages.What did the EA report about what it did?
JournalActions of the user and the terminal in the current session. In MT5 this includes the platform start and the execution of trade operations.What did the platform record around the time the EA sent a request?
  • Where to find them. In MT4, the tabs are in the Terminal window. In MT5, they are in the Toolbox window, where the Journal table has Time, Source and Message columns.
  • Time. In MT5, the Time column uses the time zone of your computer. Convert it before you compare it with a timestamp from another source, such as a record from the trade server.
  • What the tab shows. Each tab only shows the latest entries. The Open command in the context menu flushes the current entries to log files and opens the log folder; file names follow the pattern YYYYMMDD.LOG. In MT4, the Journal files are in the terminal's LOGS folder and the Experts files in MQL4/LOGS. In MT5, platform logs are in Logs and EA logs are in MQL5\Logs.
  • Clearing is safe. The Clear command empties the tab but does not delete the log files.
  • Searching. The Viewer command opens a log viewer. In MT4 it searches for exact, case-sensitive words and can filter to errors only.

The Experts log shows the EA's own messages, if it writes any. Whether it reports a reason for not trading depends on how its author wrote it, so an empty Experts log does not mean the EA is healthy; check the Journal as well.

4. Check the chart and the inputs

If Layers 1 to 4 are open and the log shows no refusal, check what the EA is being asked to do.

  • Symbol and timeframe. Many EAs are written for specific symbols or timeframes. Check the EA author's documentation, then compare the symbol name on the chart with the name in the Market Watch window; names can differ in small ways.
  • Direction setting. In MT4, the Common tab has a Positions setting: Long & Short, Only Long, or Only Short. An EA that only produces sell signals does nothing if it is set to Only Long.
  • Inputs. Review the Inputs tab: lot size, maximum spread, allowed trading hours, and maximum open positions are typical examples, but the actual list depends on the EA. Do not change an input you do not understand; read the EA's documentation first. If you change inputs, the EA is re-initialized with the new values.
  • Symbol trading mode. In MT5, a symbol has a trade mode that can be disabled, long only, short only, or close only (see the MQL5 reference). An EA's request can be refused for that reason alone.
  • History. If the EA's documentation says it needs chart history to calculate its indicators, give the terminal time to load the data before judging.

5. Refused orders: the common messages

When an order request is refused, the log usually contains an error text. The two platforms use different numbering, and the lists are not one-to-one, so use the text and the number from the platform you are using. The wording below is from the MetaQuotes MQL4 and MQL5 references.

MeaningMT4 errorMT5 return code
Market is closed132, ERR_MARKET_CLOSED10018, TRADE_RETCODE_MARKET_CLOSED
Trade is disabled133, ERR_TRADE_DISABLED10017, TRADE_RETCODE_TRADE_DISABLED
Not enough money134, ERR_NOT_ENOUGH_MONEY10019, TRADE_RETCODE_NO_MONEY
Invalid stops130, ERR_INVALID_STOPS10016, TRADE_RETCODE_INVALID_STOPS
Invalid volume131, ERR_INVALID_TRADE_VOLUME10014, TRADE_RETCODE_INVALID_VOLUME
No connection with the trade server6, ERR_NO_CONNECTION10031, TRADE_RETCODE_CONNECTION
Trading not allowed at the terminal4109, ERR_TRADE_NOT_ALLOWED: "Enable checkbox 'Allow live trading' in the Expert Advisor properties"10027, TRADE_RETCODE_CLIENT_DISABLES_AT: "Autotrading disabled by client terminal"
Automated trading disabled by the server4112, ERR_TRADE_EXPERT_DISABLED_BY_SERVER10026, TRADE_RETCODE_SERVER_DISABLES_AT

How to read the table: a code tells you what the platform refused, not why, because the references define the codes but do not list every possible cause. Start from the meaning in the first column. "No connection" means the terminal has no connection to the trade server, which you can also see in the Journal. The last two rows return you to the permission layers in Section 2. Order limits such as minimum volume, stop distances and available margin depend on your trading account and the instrument, so look them up in the account's specifications rather than guessing.

6. When the EA is waiting, not broken

Most EAs react to price ticks: the tick handler is called when a new tick arrives for the symbol of the EA's chart. An EA that works this way, attached to a chart with no incoming ticks, has nothing to react to. (An EA can also use other events, such as a timer, so check how yours is built.) In the MQL5 documentation this event is generated whether or not auto trading is enabled: turning auto trading off only blocks the sending of trade requests, and the EA keeps running. This explains two situations that look alike from the outside: an EA that is running but blocked from trading (State B), and an EA that is allowed to trade but has had no tick or entry signal to act on (State D).

Typical reasons for a correct, silent EA:

  • The market for that symbol is closed or quiet, so no new tick has arrived.
  • The entry condition of the strategy has not been met. A human looking at the chart may think a signal is close, but the EA evaluates its own rules.
  • A built-in filter, such as a time window or a spread limit, is blocking entries on purpose. Whether the EA has such filters is defined by its author, so check the documentation.

Do not widen filters or lower safeguards just to force a trade. If you want to test behavior, use a demo account; do not place test orders on a live account.

Tester behavior. Testing on history is different from running in real time. For example, an EA that relies on the WebRequest() function cannot use it in the Strategy Tester, according to the MQL4 and MQL5 references, so its tester results can differ from its live behavior.

7. DLL imports and WebRequest: not a general fix

Two terminal options sometimes appear in EA instructions:

  • Allow DLL imports. MetaQuotes recommends disabling it when you work with unknown EAs, and notes that applications from unknown sources can cause damage through third-party DLLs. In MT5, if an EA uses a DLL while the import is prohibited, the OK button is not shown in the start window, so the EA cannot be started.
  • Allow WebRequest for listed URL. The option is off by default for security reasons, and you add trusted URLs one by one.

Enable these only if the EA author's documentation states that the EA needs them and you trust the source, and then add only the specific items named there. Turning on DLL imports or allowing many URLs to "see if it helps" is not a diagnostic step.

8. What to send when you ask for help

When you contact an EA developer or the support team of your trading-account provider, give them facts that let them reproduce the problem, and leave out anything that identifies or gives access to your account.

Include:

  • The platform (MT4 or MT5) and the terminal build number.
  • The EA name and version, the symbol and the timeframe.
  • The date and time of the event, with the time zone (MT5 logs use your computer's time zone).
  • The relevant lines from the Experts and Journal logs, copied with the Copy command, with the Source column in MT5.
  • The settings you changed, and the state of the four permission layers.

Leave out or mask: account number, login, passwords, and any screenshot that shows them.

FAQ

The EA shows its name on the chart, but there are no trades. Does that mean it is broken?
No. The name only shows that the EA is attached. Check the permission layers (Section 2), then the logs (Section 3), then whether the EA is simply waiting (Section 6).

If I turn off the Algo Trading (AutoTrading) button, does the EA stop?
Not necessarily. The EA keeps running, but trade requests are blocked.

Why did my EA stop trading after I changed the timeframe?
If the protective option for changing the symbol or period is on, the EA's trading permission is switched off when you change it. Recheck the permission for that EA.

Do I need to allow DLLs or WebRequest to fix a non-trading EA?
Only if the EA's own documentation says so. Treat them as security-sensitive options.

Does this apply to mobile apps?
This checklist covers desktop terminals only.

Sources

All pages were checked on 2026-10-10.

This article is general information about how MetaTrader terminals behave. It is not investment advice and does not promise any trading result. Trading involves risk, and a working EA does not make a strategy profitable.

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

CAPTCHA