Skip to main content
HomeGlossaryWhat is an Expert Advisor?
Trading term · definition

What is an Expert Advisor (EA)?

An expert advisor (EA) is an automated program written in the MQL4 or MQL5 language that runs inside a MetaTrader 4 or MetaTrader 5 terminal and opens, manages or copies trades according to coded rules. It attaches to a chart and acts on price data without a person clicking each order, which is why EAs are also called trading robots.

Start free — no credit cardSee pricing

Risk warning: CFDs are complex instruments with a high risk of losing money rapidly due to leverage. 70–80% of retail investor accounts lose money when trading CFDs. Risk disclosure · Past performance.

An EA only runs while its MetaTrader terminal is open and connected, so most users keep the terminal on a Windows VPS to keep it active around the clock. EAs cover a wide range of jobs: full strategies that generate their own entries and exits, trade managers that adjust stops or take profit, and copier EAs that mirror trades from one MetaTrader account to another. They are specific to MetaTrader; the cTrader platform uses cBots written in C# instead of EAs.

Expert advisor at a glance

What it isAn automated program that runs inside a MetaTrader terminal to trade or manage trades by rules
LanguageMQL4 (MetaTrader 4) or MQL5 (MetaTrader 5)
Where it runsAttached to a chart inside the MT4 or MT5 desktop terminal, which must stay open and connected
Common typesStrategy EAs, trade-manager EAs, and copier EAs that mirror trades between accounts
Typical hostingUsually a Windows VPS so the terminal stays online 24 hours a day
Not the same ascTrader cBots (written in C#) or a cloud execution layer that needs no terminal
PriceFree plan available (EUR 0); paid plans from EUR 49/month

What is an expert advisor (EA)?

An expert advisor is an automated program, written in MetaTrader's MQL4 or MQL5 language, that runs inside an MT4 or MT5 terminal and trades or manages trades according to rules in its code. Once compiled and attached to a chart, it reacts to incoming price data and can place, modify and close orders without manual clicks.

Because it follows fixed logic, an EA does exactly what it is programmed to do, no more and no less. Traders use them to remove the manual step from a strategy, to enforce discipline around entries and exits, or to mirror trades from another account.

How does an expert advisor work inside MetaTrader?

An EA works by running as compiled MQL code attached to a single chart inside the MetaTrader terminal. The terminal feeds it new ticks and bars, and on each event the EA's logic decides whether to open, change or close a position, then sends those orders to the broker through the terminal's connection.

This design means the EA is tied to the terminal. It only acts while MetaTrader is open, logged in and connected to the broker; if the terminal closes, loses connection or the machine sleeps, the EA stops and any rules it was enforcing pause until the terminal is running again.

  • Written in MQL4 for MetaTrader 4 or MQL5 for MetaTrader 5, then compiled to an .ex4 or .ex5 file
  • Attached to one chart and driven by that symbol's tick and bar events
  • Sends orders to the broker through the terminal, not directly over the internet
  • Runs only while the terminal is open, logged in and connected

Why do expert advisors usually need a VPS?

Expert advisors usually need a VPS because they only run while their MetaTrader terminal is open and online, and a personal computer that sleeps, reboots or loses internet will stop the EA. A virtual private server is a remote computer that stays on continuously, so the terminal and its EA keep running even when the trader's own machine is off.

For round-the-clock or fast-moving markets this matters, because a strategy or copier that misses ticks while the terminal is down can miss or mismanage trades. The trade-off is that a VPS is an extra cost and an extra piece of infrastructure the trader has to set up, secure and maintain.

What is a copier EA, and how does it differ from a cBot?

A copier EA is a specific kind of expert advisor whose job is to mirror trades rather than generate them. One EA reads trades on a source MetaTrader account and a partner EA reproduces them on one or more destination accounts, often with adjusted lot sizes. It is still an EA, so it still depends on each MetaTrader terminal staying open and connected.

A cBot is the cTrader equivalent but is not an EA at all. cTrader does not run MQL or expert advisors; its automated programs, called cBots, are written in C# and run inside cTrader's own Automate environment. So an EA and a cBot solve similar problems on different platforms, and code for one does not run on the other.

Do you always need an EA to automate trades?

No. An EA is only required when the automation has to run inside a MetaTrader terminal. Other platforms automate differently: cTrader uses C# cBots, and platforms such as Match-Trader, Binance Futures and Bybit expose REST or WebSocket APIs that an external service can call directly, with no terminal-side program at all.

A cloud execution layer is one alternative to the terminal-plus-EA model. PipSync, for example, runs the parsing and order routing on its own servers and connects to brokers over their APIs or supported integrations, so there is no EA, cBot, plugin or terminal to keep open and no VPS to maintain. PipSync is execution infrastructure, not a strategy or signal provider, and trading leveraged products still carries substantial risk of loss.

Try it on the free plan

Connect a signal source and a broker account, watch PipSync parse and route in real time, and upgrade only if you need more. No credit card required to start.

Start free — no credit cardSee pricing

Risk warning: CFDs are complex instruments with a high risk of losing money rapidly due to leverage. 70–80% of retail investor accounts lose money when trading CFDs. Risk disclosure · Past performance.

FAQ

Frequently asked questions

What is an expert advisor in MT4 or MT5?

An expert advisor (EA) is an automated program written in MQL4 or MQL5 that runs inside the MetaTrader 4 or MetaTrader 5 terminal. Attached to a chart, it opens, manages or closes trades according to its coded rules without a person placing each order. EAs are also known as trading robots.

Written by the PipSync team · Reviewed by Tobias Russmann, Director, PipSync · Published · Last updated

PipSync is a cloud-based signal automation platform that routes trading signals from Telegram, Discord, TradingView alerts and custom webhooks to broker accounts on MetaTrader 4, MetaTrader 5, cTrader, Match-Trader, Binance Futures and Bybit — with server-side risk management and no VPS required. PipSync is an execution tool, not a signal provider and not investment advice.

PipSync is a signal execution tool. It does not provide trading signals, does not guarantee any trading results and is not investment advice. Trading leveraged products involves substantial risk of loss. See the full risk disclosure and performance disclaimer.