MetaTrader 5

How to Enable Algorithmic Trading in MT5

An EA in MetaTrader 5 needs permission in three places: the terminal options, the EA's own settings and the Algo Trading button. Where each one is, and what turns them off.

By the AURAX teamPublished 3 min read

On this page (4)

An EA in MT5 trades only when algorithmic trading is allowed in three places at once: the terminal-wide option (Tools → Options → Expert Advisors → Allow algorithmic trading), the EA's own setting (Allow Algo Trading on its Common tab), and the Algo Trading button in the toolbar. If any one is off, the EA can run and log messages but cannot open or close a single trade.

The three switches
SwitchWhereScope
Allow algorithmic tradingTools → Options → Expert AdvisorsTerminal default
Allow Algo TradingEA settings (F7 on the chart) → Common tabThis EA on this chart
Algo Trading buttonMain toolbar (Ctrl+E)Every EA in the terminal, right now
The three switches.

Part of the MT5 Expert Advisor guide.

Step by step

  1. Terminal options

    Tools → Options → Expert Advisors. Tick Allow algorithmic trading. While you are there, read the options under it (next section) — several of them switch algo trading off automatically.

  2. The EA's own permission

    On the chart running the EA, press F7 (or right-click → Expert list → Properties). On the Common tab, tick Allow Algo Trading. Click OK.

  3. The toolbar button

    Click Algo Trading in the toolbar, or press Ctrl+E. It is on when it is highlighted.

  4. Check the chart

    The EA's name in the chart's top-right corner shows an icon that changes when trading is allowed. The Experts tab should show no "algo trading disabled" messages.

What turns algo trading off

The terminal options include safety switches that disable algo trading on certain events. They are sensible defaults for a desktop, and a common reason an EA silently stops on a server:

  • Disable algorithmic trading when the account has been changed — logging in to another account.
  • … when the profile has been changed — switching chart profiles.
  • … when the chart symbol or period has been changed — changing the timeframe of the EA's chart.
  • Pressing Ctrl+E by accident, which toggles the toolbar button for every EA at once.

The account itself can also forbid automated trading. If the Journal says trading is disabled for the account, or you logged in with the investor (read-only) password, no local setting will help — log in with the trading password, or ask the broker.

Other permissions an EA may need

PermissionWhereNeeded when
Allow WebRequest for listed URLTools → Options → Expert AdvisorsThe EA talks to a server (licence, portal, signals)
Allow DLL importsOptions, and the EA's Dependencies tabThe EA calls external libraries — only enable for code you trust

Diagnosing an EA that will not trade

Where to lookWhat it tells you
Algo Trading buttonWhether any EA can trade at all
Chart corner iconWhether this EA is allowed
Experts tabThe EA's own log — its reasons for not trading, and errors like invalid volume
Journal tabThe terminal's side — connection, login, "trade disabled" from the server
Market Watch → SpecificationWhether the market is open now and the minimum lot

Work down that list in order. Most "broken EA" reports are one of the switches in this article, a market that is closed, or a volume below the broker's minimum.

Sources