# What is an Expert Advisor (EA)?

Source: https://pipsync.io/en/what-is-an-expert-advisor
Last updated: 2026-06-08

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.

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 is | An automated program that runs inside a MetaTrader terminal to trade or manage trades by rules |
| Language | MQL4 (MetaTrader 4) or MQL5 (MetaTrader 5) |
| Where it runs | Attached to a chart inside the MT4 or MT5 desktop terminal, which must stay open and connected |
| Common types | Strategy EAs, trade-manager EAs, and copier EAs that mirror trades between accounts |
| Typical hosting | Usually a Windows VPS so the terminal stays online 24 hours a day |
| Not the same as | cTrader cBots (written in C#) or a cloud execution layer that needs no terminal |
| Price | Free plan at $0; paid plans from USD 24/month, billed at checkout |

## 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.

## FAQ

### 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.

### What programming language are expert advisors written in?

Expert advisors are written in MetaQuotes Language, either MQL4 for MetaTrader 4 or MQL5 for MetaTrader 5. The source code is compiled into an .ex4 or .ex5 file that runs inside the terminal. cTrader does not use MQL; its automated programs, called cBots, are written in C# instead.

### Does an expert advisor need the terminal to stay open?

Yes. An EA only runs while its MetaTrader terminal is open, logged in and connected to the broker. If the terminal closes or the computer loses internet or goes to sleep, the EA stops acting. This is why many traders run the terminal on a Windows VPS that stays on continuously.

### What is the difference between an expert advisor and a cBot?

An expert advisor runs inside MetaTrader and is written in MQL4 or MQL5, while a cBot runs inside cTrader and is written in C#. They serve similar purposes, such as automated strategies or trade management, but they belong to different platforms, and code written for one does not run on the other.

### What is a copier EA?

A copier EA is an expert advisor designed to mirror trades from one MetaTrader account to others rather than generate its own signals. A source EA reads the original trades and a destination EA reproduces them, often with adjusted lot sizes. Like any EA, it depends on each MetaTrader terminal staying open and connected.

### Can you automate trades without an expert advisor?

Yes. An EA is only needed when automation must run inside a MetaTrader terminal. cTrader uses C# cBots, and platforms like Match-Trader, Binance Futures and Bybit expose APIs an external service can call directly. A cloud execution layer can also route trades server-side with no EA, cBot, terminal or VPS required.

### Is PipSync an expert advisor?

No. PipSync is cloud-based execution infrastructure, not an EA, cBot, plugin or terminal-side program, and it is not a signal provider or investment advice. It parses incoming signals and routes orders to brokers from its own servers over their APIs or supported integrations, so no terminal needs to stay open and no VPS is required.

## Related

- [What is a trailing stop?](https://pipsync.io/en/what-is-a-trailing-stop)
- [What is MetaTrader (MT4 and MT5)?](https://pipsync.io/en/what-is-metatrader)
- [What is cTrader?](https://pipsync.io/en/what-is-ctrader)
- [What is a VPS for trading (and do you need one)?](https://pipsync.io/en/what-is-a-vps-for-trading)
- [What is a signal copier?](https://pipsync.io/en/what-is-a-signal-copier)
- [Signal copier with no VPS — execution runs in the cloud](https://pipsync.io/en/signal-copier-no-vps)
- [Why MetaTrader has no inbound webhook (and how to automate TradingView alerts anyway)](https://pipsync.io/en/metatrader-webhook)

---

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.
