Permission levels
An EA can trade only if trading is allowed at every level at once. Per the MetaTrader 5 and MQL5 help:
| Level | Where it is switched on | What «off» means |
|---|---|---|
| Terminal | the «AutoTrading» button on the toolbar, or «Tools» → «Options» → «Expert Advisors» → «Allow Auto Trading» | no EA or script trades, even one allowed individually |
| EA | the «Allow Auto Trading» box on the «Common» tab of the EA's properties | this EA does not trade |
| Account | on the trade server side | the server has disabled EA trading on the account; logging in with the investor password, for example, blocks any trading |
The MetaTrader 5 help calls the button «AutoTrading»; in the terminal it may be labelled «Algo Trading». Whether an EA may trade shows in the icon in the top right corner of the chart: trading allowed or trading prohibited.
What the switch does and does not do
Turning algo trading off blocks trading operations only. EAs and scripts keep running: they receive ticks, calculate, draw, send data and alerts. Open positions are not closed either, but the EA can no longer manage them — move a stop or close a position by its own rules.
The terminal can also turn algo trading off by itself. «Tools» → «Options» → «Expert Advisors» has options to disable automated trading when switching accounts, when switching profiles, and when switching chart symbols or period. Trading through the external Python API is disabled by default — to allow it, untick «Disable automatic trading through the external Python API».
Common mistakes
- Turning on the terminal button and forgetting the box in the EA's properties — or the reverse.
- Switching accounts or profiles without noticing that algo trading went off.
- Believing the button stops the EA or closes positions.
- Logging in with the investor password and expecting the EA to trade.
If everything is on and there are still no trades, causes and error codes are covered in «Why an EA is not trading in MT5»; the first launch — in «How to install an EA in MT5».
Algo trading and Davinchu's EAs
The Davinchu Trade Monitor EA needs no algo trading: the monitor only reads account data and sends it to the dashboard. The T-Manager risk manager for MT5 does need it — before every order it checks that trading is allowed in the terminal, for the EA itself, on the account at all and for EAs on that account, plus the symbol's trade mode (disabled or close-only). If anything blocks it, the order never reaches the broker and the reason appears on the «Experts» tab. What an EA is in general — «What is an Expert Advisor (EA)».
Frequently asked questions
Does turning off AutoTrading stop the EA?
No. The EA keeps running but cannot open, modify or close positions. Open positions are not closed either.
Why did AutoTrading turn off by itself?
If the «Expert Advisors» options to disable automated trading on switching accounts, profiles, symbols or chart period are on, the terminal switches it off on those actions. The trade server can also disable EA trading.
Does an EA that only sends data need AutoTrading?
No: the switch blocks trading operations only. The Davinchu Trade Monitor, for example, does not need it, while a trading EA and the T-Manager risk manager do.