TroubleshootingUpdated 27 November 20266 min read

Algo trading in MT5 can be off in the toolbar, in the EA's own settings or on the broker's server. How to tell which from the Journal, and what to do.

In short
  • Algo trading in MT5 can be off in three places: the Algo Trading button of the terminal, the Allow Algo Trading box of each EA, or the account on the broker's trade server.
  • The reason in a failed order line tells the sides apart: disabled by client (code 10027) points to your terminal, disabled by server (code 10026) to the account on the trade server.
  • If the button keeps switching itself off, look at the terminal options that disable algo trading when you change account, profile, or a chart's symbol or period.
  • A server-side block is set by whoever runs the account, the broker or the prop firm. Nothing in the terminal or on a VPS lifts it: ask them.

"Algo trading disabled" in MetaTrader 5 means one of three switches is off: the Algo Trading button of the terminal, the Allow Algo Trading box of that particular EA, or automated trading for the account on the broker's trade server. The first two you fix yourself in a minute. The third is set by the broker or the prop firm that runs the account, and only they can change it. The reason printed in the failed order line tells you which side it is on.

The three places where algo trading can be off in MT5: the toolbar button, the EA's own setting, the account on the trade server
Two switches are on your side, the client side; the third is on the server and is reported as disabled by server.

The three places, side by side

WhereWho controls itWhat you seeReason in the logsFix
Algo Trading button (terminal)YouThe toolbar button is off; every EA in the terminal stops tradingdisabled by client, code 10027Click the button; check the options below if it switches off again
Allow Algo Trading (each EA)YouOnly that EA stops; its chart icon shows it is not allowed to tradeClient side; the MQL5 reference lists no separate code for this boxTick the box in the EA's Common tab
Automated trading for the account (trade server)The broker or prop firmButton and EA box are on, but every EA order is refuseddisabled by server, code 10026Ask the broker or the firm

The labels in current MT5 builds are Algo Trading for the toolbar button, Allow Algo Trading in the EA and Allow algorithmic trading in the options. Older builds, and the MetaTrader 5 help, still call them AutoTrading and Allow Auto Trading. Same switches.

Read the reason in the Journal and Experts tabs

Open the Toolbox (Ctrl+T) and look at the Journal and Experts tabs around the time the EA should have traded. A refused order line carries the reason, often in square brackets at the end. Traders have posted lines like these on the MQL5 forum:

  • '45767': failed market buy 10 EURUSD sl: 0.99529 [AutoTrading disabled by server] (forum thread)
  • OrderCheck() failed: AutoTrading disabled by client (10027) (forum thread)

The exact wording depends on the build and on how the EA prints its errors. The word that matters is client or server, or the code: 10027 is "Autotrading disabled by client terminal", 10026 "Autotrading disabled by server". In the same 10027 thread, one trader saw "disabled by client" with both the button and the EA box on, and another reply suggested a bug with some brokers: if your switches are all on, send the line to your broker.

Two more lines are worth looking for. A trader in the same 10027 thread posted entries with the source "Experts" reading "automated trading is enabled" and "automated trading is disabled": their times show when the switch changed, which you can match to what you were doing then. And "trading has been disabled - investor mode" means the account itself is read-only (see below).

Terminal side: the button and what switches it off

  1. Click Algo Trading on the toolbar. It should show as active, and the icon of each EA in the upper right corner of its chart should change to the active state.
  2. Open Tools, Options, and the Expert Advisors tab. The box Allow algorithmic trading (Allow Auto Trading in the help) is the terminal-wide permission, the same switch as the button.
  3. In the same tab, read the three options that disable algo trading automatically: when switching accounts, when switching profiles, and when switching a chart's symbol or period. They are protections. With any of them ticked, that action stops the EAs from trading until you switch algo trading on again.

If the EAs stop every time you log in to another account, it is the first option. Untick it only if you understand what it protects you from: EAs left running from a demo account starting to trade a real one when you switch.

EA side: the Allow Algo Trading box

  1. Right-click the EA's icon in the upper right corner of the chart, open its properties and go to the Common tab.
  2. Tick Allow Algo Trading and press OK.
  3. Check the icon in the upper right corner of the chart: the MT5 help shows one icon for automated trading enabled and another for disabled.

The box only has effect when the button is on: with the terminal switch off, no EA trades, whatever its own setting says. In the forum thread on code 10027, one reply points to this box on that specific chart as what must be checked.

Server side: the broker or the prop firm

The MQL5 reference describes a permission that lives on the trade server: automated trading can be disabled for an account, and then EA orders are not executed. Your terminal cannot override it, and no setting on a VPS changes it.

How to tell it apart:

TestResultMeaning
A manual order on the same account, if you choose to test one (smallest size, closed straight away; it costs at least the spread)Manual works, EA orders fail with disabled by serverAutomated trading is off for this account on the server
Same testManual orders fail tooAll trading is off for the account: investor password, account archived or switched to read-only, or trading disabled on the server
Journal"trading has been disabled - investor mode"You logged in with the investor password; log in again from the File menu with the master password

When the server has algo trading off, ask the broker or the firm whether automated trading is allowed on that account type, and send them the Journal line with its time. Prop firms set their own rules on EAs: read the rules of your programme, and see what prop firms say about VPS use.

When it is not the algo trading switch at all

Some refusals look similar but are not about algo trading: 10018 market closed, 10017 trade is disabled, 10044 only position closing allowed for the symbol. They need the symbol's trading sessions or the broker's conditions, not the switches above. The full checklist for an EA that does not trade, including symbol suffixes and DLL permission, is in EA not trading on the VPS.

When a VPS is not the fix

A VPS keeps the terminal running; it does not change any of the three switches. If the cause is server side, moving the EA to a VPS, or to another VPS, changes nothing. If it is terminal side, the same check applies on the VPS as on your PC; with the "switching accounts" option ticked, logging in to your account after a demo account on the new terminal turns algo trading off.

How this works on Dipgate

On a Trading VPS you work in your own MetaTrader 5 over Remote Desktop, so the button, the EA box and the options above are where they are on your PC. Closing the Remote Desktop window leaves the terminal running with its algo trading state. If you use the "My Platforms Autostart" folder so MT5 starts again after a reboot, check after a restart that the terminal is logged in to the right account and that Algo Trading is on.

FAQ

Why does the Algo Trading button turn off when I log in to my account?

The terminal options include disabling automated trading when switching accounts, a protection for the move from demo to real. With it ticked, every account change stops the EAs until you switch algo trading on again.

Manual orders work but my EA gets disabled by server. How is that possible?

The MQL5 reference lists automated trading disabled for the account on the trade server as its own permission level, separate from the account-level block under which neither manual nor automated trading works. Manual orders going through while EA orders fail with disabled by server fits the first case.

Algo Trading is on and the EA is allowed, but the icon on the chart still shows it disabled. What now?

Remove the EA from the chart and attach it again, then check the Common tab before pressing OK. If it still shows disabled, read the Experts tab: an EA can refuse to start and print its own reason there.

Should Algo Trading stay on in my home MT5 after I move the EA to a VPS?

Not for the same account and EA: if both copies run, both act on the same signals. Switching it off at home, or removing the EA there, leaves one copy trading.

Is MT4 different?

The three places are the same. In MT4 the button is AutoTrading, the EA box is Allow live trading, and the errors are 4109 "trade is not allowed" on your side (the MQL4 reference points to the Allow live trading box) and 4112 for the server.