ATI Learning / Automation Basics
What Is an Expert Advisor? How EAs and Trading Bots Actually Work
An Expert Advisor is a program that trades automatically inside MetaTrader by fixed rules. Every other trading bot follows the same pattern in a different place. None of them can see the future.
The direct answer
What is an Expert Advisor?
An Expert Advisor (EA) is a program written in MQL4 or MQL5 that runs inside MetaTrader 4 or 5 and automates analysis and trading. It reads prices and indicators, then opens, changes or closes orders on your broker account by preset rules. An EA only follows its code. Nothing about it guarantees profit.12
The most common misunderstanding is that automation creates an edge. It does not. An EA executes a strategy faster and more consistently than a person can, but the strategy itself can be weak, outdated or unsuited to your broker. The CFTC puts it plainly: AI technology “can’t predict the future or sudden market changes.”19
A trading bot is rules plus a connection. Judge the rules by evidence, and control the connection yourself.
Before choosing any automated system, read ATI’s guide on how to evaluate an automated trading system and the main algorithmic trading risks. If a pitch already sounds too good, start with the trading bot scam red flags. You can also see how each system in the ATI Directory records its platform and execution method.
Apply it to real systems
Which kind of bot is each system in the directory?
Each ATI system file records the platform a system runs on and how it reaches your account. The same four questions apply to all of them: where it runs, who controls the account, what must stay online and what evidence exists.
Browse all 11 documented systems- Forex · MT4 / MT5Cypher Pros
Listed as an MT4 / MT5 system, the classic Expert Advisor setup. Its profile notes a public Myfxbook real-money record. Profile reviewed 02 Sep 2026.
Open system file → - Indices · NinjaTrader 8Vincere Trading
Listed on NinjaTrader 8, where automated systems run as NinjaScript strategies. Profile reviewed 26 Sep 2026.
Open system file → - Multi-asset · Broker APIGemAlgo
Listed as a broker API system rather than a MetaTrader EA. Profile reviewed 02 Sep 2026.
Open system file → - Multi-asset · MT4 / MT5 copy tradingGemeos AI
Listed as MT4 / MT5 copy trading, where trades come from another account. Research in progress; profile reviewed 14 Sep 2026.
Open system file →
Mechanics
How an Expert Advisor works, step by step
An EA does nothing until the terminal loads it, grants it permission and feeds it new prices.
MetaTrader describes Expert Advisors as programs that take over “the entire routine work of technical analysis and trading.”1 In practice, that work follows a fixed sequence. Each step is also a place where something can go wrong.
- 01The developer writes and compiles it.
The code is written in MQL4 (MetaTrader 4) or MQL5 (MetaTrader 5) and compiled into an .ex4 or .ex5 file. EAs sit in the platform’s Experts folder.2
- 02You attach it to a chart.
You drag the EA onto a chart of one symbol, such as EURUSD, and set its inputs, such as lot size or stop distance. Only one EA can run on each chart.3
- 03You grant permission, twice.
MetaTrader 5 has a platform-wide Algo Trading button and a separate “Allow Algo Trading” setting for each EA. Both must be on. If the global control is off, “no Expert Advisor will be allowed to trade.”6
- 04It initializes.
When the EA loads, the terminal calls its OnInit function. The EA checks its settings and prepares its indicators. If this fails, the EA is removed from the chart.4
- 05It reacts to each new price.
Every new tick for the chart’s symbol triggers OnTick. The EA reads prices and indicator values, applies its rules and decides whether to act.4
- 06It sends orders to your broker.
When its conditions are met, the EA sends a trade request. Your broker’s trade server executes, rejects or changes it. The EA does not trade “on the market” directly.
- 07It manages open positions.
The same tick-by-tick cycle moves stops, trails profits and closes trades.
- 08It stops when the terminal stops.
Removing the EA, closing the chart or closing MetaTrader ends it. No running terminal means no new trades and no trade management.
Program types
EA vs indicator vs script: what can actually trade?
Only one kind of MetaTrader program is built to trade continuously on its own.
MetaTrader runs several kinds of programs, and vendors do not always label them clearly. MetaTrader 5 Help describes Expert Advisors as “mechanical trading systems” that can fully automate trading. Custom indicators “cannot trade automatically” and only perform analysis.2 Scripts run once, on request.
| Program | Can it trade? | How it runs | Per chart | After a restart |
|---|---|---|---|---|
| Expert Advisor | Yes | Continuously, reacting to each tick | One | Reloaded automatically |
| Custom indicator | No, analysis only | Continuously | Any number | Reloaded automatically |
| Script | Yes, once | A single run on request | Temporary | Not reloaded |
Beyond MetaTrader
How other trading bots work
Every trading bot follows the same pattern of rules plus connection, but where it runs changes who holds control.
“Trading bot” is the general term for any program that turns preset rules into orders. Forex robots and Expert Advisors are one type. The main differences between types are where the code runs, what must stay online and how much of your account the bot can touch.
- 01NinjaTrader strategies.
On NinjaTrader, automated systems are NinjaScript strategies. They need a live broker or data connection to run, and NinjaTrader’s help states that “orders generated are live.”11 NinjaTrader is used mostly for futures.
- 02TradingView setups.
Pine Script strategies can be tested on TradingView but “cannot directly place orders.” Live automation sends TradingView alerts through a webhook to a third-party service, which then places the trade.12 TradingView only allows webhook alerts with two-factor authentication turned on.13 Each extra service in the chain adds its own uptime and security risk.
- 03cTrader cBots.
On cTrader, bots are called cBots and are written in C# or Python. They can run on your computer or as cloud instances.14
- 04
- 05Copy trading and signal services.
Here the “bot” is another person’s account. Trades from a provider’s account are copied into yours. Copy trading has its own guide.
| Platform | Written in | Where it runs | What must stay online | Who controls your account |
|---|---|---|---|---|
| MetaTrader 4 / 5 | MQL4 / MQL5 | Your PC, a VPS or MQL5 VPS | The terminal and its connection | You, through your broker login |
| NinjaTrader 8 | NinjaScript (C#) | Your PC or a VPS | The platform plus a live broker connection11 | You, through your futures broker |
| TradingView + webhook | Pine Script | TradingView sends alerts; a third party executes | The alert, the webhook receiver and any linked terminal12 | Shared with the bridge service |
| cTrader | C# or Python | Your PC or cTrader cloud14 | Your app, or nothing if run in the cloud | You, through your cTrader broker |
| API bots and cloud platforms | Any language | Your server or the vendor’s | Wherever the bot runs | Whoever holds the API key |
| Copy trading | None for you | The provider’s account | The provider’s service | The copy link you approve |
Uptime
Why a trading bot has to stay online
A bot that is switched off cannot manage the trades it opened.
An EA only works while its MetaTrader terminal is running and connected. If your laptop sleeps, the EA receives no new prices. Stops already placed on the broker’s server stay in place, but no new trades open and no trailing stops move.
This is why many traders run EAs on a virtual private server (VPS). MetaQuotes offers its own hosting service, MQL5 VPS. When you move EAs there, charts without EAs are ignored and automated trading is switched off on your local platform, which prevents the same EA from trading twice.10 ATI’s guide to VPS hosting for trading bots covers when a VPS is worth it.
Buying an EA
Where EAs come from: compiled files and licenses
Most commercial Expert Advisors are sold as sealed programs that the buyer cannot read.
Commercial EAs come from vendor websites, rental services and marketplaces such as MQL5 Market. On MQL5 Market, products are sold only as compiled .ex4 or .ex5 files. Decompiling them is prohibited, and buying a product “does not mean buying rights to it.”9
In other words, you are judging a closed box. You can see what the EA does to your account, but not the rules that make it do it. That makes independent evidence far more important than the vendor’s description.
MQL5 Market’s rules also show what a marketplace does and does not check:
- 01
Sellers may not “guarantee, promise or hint at profits,” or present backtests as real trading results.9
- 02
MetaQuotes runs “only a formal test” of each product. That test checks whether the product works as the seller describes, not whether it makes money.9
- 03
The rules state that passing that test “does not mean that the results stated in the Product description will be obtained in the future.”9
- 04
Products bought through MQL5 Market “can not be returned.”9
Vendor websites sell outside these rules, so a buyer should expect fewer protections, not more.
Evidence
What backtests, demo and live records can tell you
A backtest, a demo account and a verified live account answer different questions.
Every EA vendor shows some kind of performance evidence. The type of evidence decides what it can prove.
Backtest
What the rules would have done on past data. Quality depends on the test mode and data.
Can suggest, cannot proveDemo account
How the EA behaves in real time with simulated money. Execution may differ from a funded account.
Tests mechanics, not fillsVerified live account
What happened on a real account, with history checked against the broker.
Strongest evidence, still not a forecastBacktest quality varies widely. In MetaTrader 5’s Strategy Tester, MetaQuotes says “Every tick based on real ticks” gives the most accurate result, while “Open prices only” is “a very quick and rough estimation.”7 Real-tick tests download ticks from a broker’s trade server, so even historical results depend on the broker.8 MetaTrader 4 has no real-tick mode.24 ATI’s guide to backtest vs live trading results explains the gap in detail.
Verification also has limits. On Myfxbook, “track record” verification means the history shown “matches the account’s trading history provided by the broker.”17 MQL5 Signals accepts only real accounts, and states that past success cannot guarantee future profits.18 Neither confirms that an edge will last. To judge risk in a record, read its maximum drawdown and profit factor together. How to verify trading bot performance covers each platform.
Five common trading bot claims—and how to check them
Common claim
“Set it and forget it”
An EA runs only while its terminal is connected and permitted to trade. Platform updates, account switches, VPS moves and broker changes can all stop it or change its behavior.
MetaQuotes itself warns users of its hosting service: “Do not launch the Expert Advisors you are not sure about.”10 A vendor who promises no supervision is describing a product that does not exist.
Common claim
“Our AI predicts the market”
An “AI” label says nothing about what compiled code actually does. The CFTC warns that AI “can’t predict the future or sudden market changes.”19 The SEC, NASAA and FINRA add that investors should be wary of AI claims “even from registered firms and professionals.”21
Some systems do use machine-learning models. The question is not whether AI is involved, but what evidence shows the rules work after costs.
Common claim
“The backtest proves it works”
A backtest shows how rules would have behaved on past data. Its value depends on the test mode, the data source and whether the rules were tuned to fit that history.
MQL5 Market forbids sellers from presenting backtests as real results.9 The CFTC’s case study of Mirror Trading International shows how far fake evidence can go: the operator created fake account balances using MetaTrader demo accounts, and took more than $1.7 billion in bitcoin from at least 23,000 people.19
Common claim
“It works the same at any broker”
Your broker’s trade server fills every order the EA sends. Spreads, execution speed and fills differ between brokers, and real-tick backtests use each broker’s own price history.8
A result on one broker’s account is evidence about that broker. It may not carry over to yours. Scalping systems are the most sensitive to these differences.
Common claim
“Just give us your login or API key”
A bot needs permission to trade. It never needs permission to withdraw your money. Kraken advises that “a key used only for placing orders does not need Withdraw Funds.”15
FINRA warns that auto-trading services from unregistered entities “lack the regulatory oversight and investor protections required of registered firms.”20 Handing over full account credentials moves control of your account to someone else.
Regulation
What regulators say about trading bots
Selling trading software and trading someone’s account are treated differently.
US regulators have published direct warnings about trading bots and AI claims. The CFTC’s advisory is titled “AI Won’t Turn Trading Bots into Money Machines,” and warns about promises of 100 percent win rates and returns of “tens of thousands of percent.”19 A joint alert from the SEC, NASAA and FINRA flags pitches such as “Our proprietary AI trading system can’t lose!”21
The type of service matters for registration. In US futures and forex, CFTC Rule 4.14(a)(9) exempts sellers of standardized, “non-customized computer software” from registering as commodity trading advisors, as long as they do not direct client accounts.22 A service that trades your account for you is a different category, and FINRA calls it “auto-trading.”20
Worked example
How the checks change a buying decision
Example EA X is fictional. The facts below are invented for education and do not describe a real product or company.
A compiled .ex5 Expert Advisor sold on the vendor’s own website.
“Adaptive AI finds the best trades in any market.”
A backtest in “Open prices only” mode and a Myfxbook demo account.
Runs only on the vendor’s VPS, using your master password.
License locked to one account. No refunds after download.
- 01Verification gap
The rules cannot be inspected
The file is compiled, so the “adaptive AI” claim can only be judged by results.
- 02Verification gap
The evidence is weak
An “Open prices only” backtest is a rough estimate, and a demo account shows no real fills.
- 03Material concern
Control moves to the vendor
The vendor’s server holds your master password, not a limited login.
- 04Pause for evidence
The decision
Pause. Ask for a verified live account and a hosting option that keeps your credentials with you. Do not connect a funded account until both exist.
Apply it to real systems
The same check on documented systems
| System | Platform (as listed) | Market | What the platform means for you | Profile reviewed |
|---|---|---|---|---|
| Cypher Pros | MT4 / MT5 | Forex | Runs as software in your MetaTrader terminal; the terminal must stay online | 02 Sep 2026 |
| ZeroAlgo | MT5 | Multi-asset | Runs in MetaTrader 5; the terminal must stay online | 25 Sep 2026 |
| Vincere Trading | NinjaTrader 8 | Indices | Runs as a NinjaTrader strategy; needs a live broker connection | 26 Sep 2026 |
| GemAlgo | Broker API | Multi-asset | Connects through a broker API; check which permissions it needs | 02 Sep 2026 |
| Gemeos AI | MT4 / MT5 copy trading | Multi-asset | Trades are copied from a provider account; research in progress | 14 Sep 2026 |
Platforms as listed in the ATI Directory on 30 Sep 2026. The right-hand column describes the platform type in general, not the specific system. Each system file records its own evidence and open questions.
Before you connect an account
Questions to ask an EA or trading bot provider
- 01
Which platform and account type does it run on, and with which brokers was it tested?
- 02
Who places the trades: software on my computer, your servers or a copy feed?
- 03
Which permissions do you need, and will you ever need withdrawal rights?
- 04
What is the strategy in plain words, and does it use martingale, grid or no hard stop?
- 05
Is there a verified live account, and are all accounts running this EA shown?
- 06
Which backtest mode, data source and test period did you use?
- 07
What was the largest drawdown live and in testing, and on what account size?
- 08
Is the product compiled only, and how is the license locked?
- 09
How are updates delivered, and do they reset the published track record?
- 10
Is your company registered with a regulator, and if not, which exemption applies?
- 11
What are the full costs, including hosting, rentals and profit share?
- 12
What is the refund policy?
Run these questions against a real system file.
Open the ATI Directory15 questions to ask an automated trading vendor expands on each question. Martingale and grid trading bots explains why question 4 matters.
Questions and answers
Expert Advisor and trading bot FAQs
What is an Expert Advisor in trading?
An Expert Advisor is a program that trades automatically inside MetaTrader 4 or 5 by fixed rules. It reads prices, applies its logic and sends orders to your broker. It does not predict markets or guarantee profit.1
Is an Expert Advisor the same as a trading bot or forex robot?
Yes, an Expert Advisor is one type of trading bot. “Forex robot” is a marketing name for the same idea. The label says nothing about quality; only verified live results can show that.
Can an Expert Advisor trade when my computer is off?
No. An EA only runs while its MetaTrader terminal is running and connected. To trade around the clock, the terminal must run on a VPS or MetaQuotes’ own hosting service.10
What is the difference between an EA and an indicator?
An EA can trade; a custom indicator cannot. On MetaTrader, indicators “cannot trade automatically” and only perform analysis, although an EA can use their values.2
Do AI trading bots work?
They reliably run their code, but no AI can predict sudden market moves. The CFTC says AI technology “can’t predict the future or sudden market changes.”19 Whether a bot makes money after costs is an evidence question. Is algo trading legal, legit and profitable? covers it in depth.
Can I see how an Expert Advisor I bought works?
Usually not. Commercial EAs are typically sold as compiled files, and MQL5 Market prohibits decompiling them.9 You can judge an EA only by its behavior and its verified records.
Are trading bots legal?
Using trading software is generally legal, but the rules for the provider depend on the service. Selling standardized software differs from trading clients’ accounts, which usually requires registration.22 Our legality guide covers the details.
The ATI principle
A trading bot only runs its code—so check the code’s record and keep control of the connection
Every Expert Advisor and trading bot is rules plus a connection. Automation makes a strategy faster and more consistent. It does not make a weak strategy work, and no label, whether “AI” or “verified,” replaces a real record.
Before using any bot, find out where it runs, what it can touch and what evidence stands behind it. Then compare those answers across the systems documented in the ATI Directory.