"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, side by side
| Where | Who controls it | What you see | Reason in the logs | Fix |
|---|---|---|---|---|
| Algo Trading button (terminal) | You | The toolbar button is off; every EA in the terminal stops trading | disabled by client, code 10027 | Click the button; check the options below if it switches off again |
| Allow Algo Trading (each EA) | You | Only that EA stops; its chart icon shows it is not allowed to trade | Client side; the MQL5 reference lists no separate code for this box | Tick the box in the EA's Common tab |
| Automated trading for the account (trade server) | The broker or prop firm | Button and EA box are on, but every EA order is refused | disabled by server, code 10026 | Ask 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
- 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.
- 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.
- 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
- Right-click the EA's icon in the upper right corner of the chart, open its properties and go to the Common tab.
- Tick Allow Algo Trading and press OK.
- 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:
| Test | Result | Meaning |
|---|---|---|
| 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 server | Automated trading is off for this account on the server |
| Same test | Manual orders fail too | All 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.
