AlgoPuzzle Open the Builder
← Back to all articles

Platforms

EA Not Opening Trades in MT5? 9 Common Causes and Fixes

By AlgoPuzzle · Published · Updated

When an Expert Advisor is on the chart but opens no trades, the cause is almost always one of three things: algorithmic trading is switched off, the order is being sent but rejected by the broker, or the EA's entry conditions simply haven't been met yet. In MetaTrader 5, check the "Algo Trading" button in the toolbar (it must be on) and the "Allow Algo Trading" box in the EA's own settings (Common tab); in MetaTrader 4 the equivalents are "AutoTrading" and "Allow live trading". If both are on, open the Toolbox with Ctrl+T and read the Experts and Journal tabs. They tell you whether the EA started at all, whether an order was refused and with which error code - invalid volume, not enough money, market closed, invalid stops - or whether nothing was attempted, which means the strategy is waiting for its signal. The rest of this article goes through the nine usual causes in the order worth checking them, what each one looks like in the logs, and how to fix it. None of them needs you to read or change the EA's code.

Check the Experts and Journal tabs first

The fastest way to find out why an EA isn't trading is to read what MetaTrader already logged, not to guess. Press Ctrl+T to open the Toolbox. The Experts tab shows messages the EA prints itself - that it initialised, that a signal fired, that an order failed. The Journal tab shows what the terminal did: loading the EA, sending order requests, and the server's answer to each one.

Read them as three cases. If the Experts tab is empty, the EA isn't running (causes 1-3 below). If there is a failed order with a return code, the broker refused it (causes 4-7). If there are no errors and no order attempts, the EA is running and waiting (causes 8-9).

The 9 common causes at a glance

Nine settings and conditions account for most "my EA doesn't trade" cases, and each leaves a recognisable trace in the logs.

#CauseWhat you'll seeFix
1Algo Trading button offEA name on the chart, but orders fail with "autotrading disabled" (MT5 10027) or "trade is not allowed" (MT4 4109)Turn on Algo Trading (MT5) / AutoTrading (MT4) in the toolbar
2"Allow Algo Trading" unticked for this EASame as above, but only this one EA is affectedRight-click the chart → Expert Advisors → Properties → Common tab, tick it
3EA not compiled or failed to startEA missing from the Navigator, or removed from the chart with an initialisation error in the Experts tabCompile it in MetaEditor (F7) with 0 errors; read the init error
4Symbol name differs at this brokerWorks in the tester, fails live; "unknown symbol" or nothing happensCheck Market Watch for the broker's exact name (suffixes like .m or -pro)
5Market closed or symbol not tradable"Market closed" (MT5 10018, MT4 132) or "trade disabled" (10017, 133)Wait for the session to open; check the symbol's trade mode in its Specification
6Lot size outside the broker's limits"Invalid volume" (MT5 10014, MT4 131)Use a lot between the symbol's minimum and maximum, in its volume step
7Not enough free margin"No money" (MT5 10019, MT4 134)Smaller lot, more balance, or fewer open positions
8Entry conditions not met yetNo errors and no order attempts at allUsually nothing to fix - see below
9Position limit or time filter already blockingNo errors; a trade is already open, or it's outside the EA's trading hoursCheck the EA's max-positions and trading-hours inputs

Causes 1-3: the EA isn't allowed to trade, or isn't running

An EA needs two separate permissions to trade: the global Algo Trading switch for the whole terminal, and its own "Allow Algo Trading" setting on the chart. Either one off is enough to block every order. The global button is easy to switch off by accident with Ctrl+E, and MetaTrader 5 can be set to turn it off automatically when you change account or profile (Tools → Options → Expert Advisors), so check it again after logging in to a different account.

If the EA doesn't even appear in the Navigator, the terminal has no compiled file to run. A .mq5 or .mq4 file is source code; it has to be compiled in MetaEditor into an .ex5 / .ex4 first, and the Errors tab must show 0 errors. If the EA appears on the chart and then disappears, it failed during start-up - the Experts tab says why.

Two account-level causes look similar: logging in with the investor (read-only) password, which can view but never trade, and an account whose trading has been disabled by the broker. Both reject orders no matter how the EA is set up.

Causes 4-7: the order is sent but rejected

When the Journal shows an order request followed by a failure code, the EA is working - the broker refused that particular order. The code tells you which rule it broke.

MeaningMT5 return codeMT4 error
Invalid volume (lot size)10014131
Invalid stops (SL/TP too close or wrong side)10016130
Trading disabled for this symbol10017133
Market closed10018132
Not enough money (margin)10019134
Algo trading disabled in the terminal100274109

Invalid stops has its own write-up: Invalid Stops Error (130 / 10016). For volume, the limits are in the symbol's Specification (right-click it in Market Watch): minimum lot, maximum lot and volume step. A lot of 0.015 is invalid where the step is 0.01, and a lot of 0.01 is invalid where the minimum is 0.1. If you're unsure how lots relate to risk, pips, points and lot sizes covers it.

Symbol names cause the classic "works in the tester, not live" problem. One broker calls it EURUSD, another EURUSD.m or EURUSDpro. An EA that sends orders for a hard-coded name that doesn't exist at your broker can't trade it.

Causes 8-9: the EA is running and simply waiting

No errors and no order attempts usually means the EA is doing exactly what it was told: waiting for its entry rule to become true. That is the most common cause of all, and not a fault.

Why an EA trades in the Strategy Tester but not live

The Strategy Tester skips two of the most common live blockers, so a good backtest doesn't prove the live setup is right. The tester runs the EA whether or not the Algo Trading button is on, and it trades the symbol you selected in the tester, with no broker suffix problem. If a strategy trades in the tester and not on the chart, check causes 1, 2 and 4 first. For running the tester itself, see How to Backtest an EA in the MT5 Strategy Tester.

A checklist, in the order worth checking

  1. Is the Algo Trading (MT5) / AutoTrading (MT4) button on?
  2. Is "Allow Algo Trading" ticked in this EA's Common tab?
  3. Does the Experts tab show the EA initialised, with no start-up error?
  4. Are you logged in with the trading password, not the investor password?
  5. Is the market open, and is the symbol name the one your broker uses?
  6. Does the Journal show a rejected order? Look up its code in the table above.
  7. If there are no errors: what timeframe does the rule run on, and has its condition actually happened since you attached it?

If the EA was built with AlgoPuzzle

AlgoPuzzle is a no-code builder that exports a strategy as a MetaTrader 5 EA (.mq5), a MetaTrader 4 EA (.mq4) or a cTrader cBot (.cs). The exported MT5 file is written to make the checks above easier:

Before exporting, the builder's backtester runs a quick simulation on 1-minute MT5 bars so you can see how often a rule would have fired. Treat it as a first check, then confirm in MT5's Strategy Tester and on a demo account before trading live.

Common questions

Why is my EA not taking trades in MT5?

Most often algorithmic trading is switched off - either the Algo Trading button in the toolbar or the Allow Algo Trading box in the EA's own settings. If both are on, check the Experts and Journal tabs: they show whether the EA started, whether an order was rejected and why, or whether the entry conditions simply have not been met yet.

Why does my EA work in the Strategy Tester but not on a live chart?

The Strategy Tester ignores the Algo Trading button and uses the symbol you pick in the tester, so two of the most common live problems never show up there. On a live chart, check that algorithmic trading is enabled, that the broker's symbol name matches the one the EA expects, and that the account allows trading.

Where do I see why an EA did not open a trade?

Open the Toolbox (Ctrl+T) in MetaTrader and look at the Experts tab, which shows what the EA itself prints, and the Journal tab, which shows what the terminal did with each order request. A rejected order usually appears there with a return code such as 10014 (invalid volume) or 10019 (not enough money).

Can an EA be running and still never trade?

Yes. An EA only opens a trade when its entry rule is true, and many EAs only check that rule once per new bar of their timeframe. A rule on the daily chart is checked once a day, so days without a trade can be completely normal.

Build an EA without code