What an expert advisor is
MetaQuotes, the company behind MetaTrader, describes expert advisors as "mechanical trading systems that allow complete automation of analytical and trading activities". An EA is written in MQL5 (or MQL4 for MetaTrader 4), attached to a chart, and runs on every new price tick: it checks its conditions and opens, manages or closes trades on its own.
| Program | What it does | Trades by itself? |
|---|---|---|
| Expert advisor (EA) | Runs a full strategy: entries, exits, stops, position size | Yes |
| Indicator | Draws or calculates something on the chart | No |
| Script | Does one job once, such as closing all trades | Only once, when you run it |
| Trade manager | An EA that only manages trades you open, such as moving a stop to break-even | Partly |
"Forex robot", "forex bot" and "robot trading" all mean the same thing in practice: an automated strategy. On MetaTrader it's an EA; on other platforms it might be a cBot (cTrader) or a script connected through an API.
How EA trading works, step by step
- The terminal has to be running. An EA only trades while MetaTrader is open and connected, which is why many traders run it on a VPS, a computer in a data centre that stays on all the time.
- Algo trading must be switched on with the Algo Trading button in MT5, and allowed in the EA's settings.
- One EA per chart. Each instance trades the symbol and timeframe of its chart, and uses a "magic number" to tell its own trades apart from yours.
- Inputs set the behaviour: lot size or risk per trade, stop loss, take profit, trading hours, and filters such as spread limits.
Common kinds of EA
- Trend and breakout EAs buy strength and sell weakness, with a stop on every trade. They lose often in ranges and make it back in trends.
- Scalping EAs take many small trades. They live or die by spread, commission and execution speed; see what costs do in the scalping calculator.
- Grid and martingale EAs add trades as price moves against them, often doubling the size. They show smooth profit curves for months, then one long move wipes out the account. Most "never-losing" EAs work this way.
- News EAs try to catch the spike after a release. Slippage and widening spreads in live trading rarely match the backtest.
- Trade managers handle position sizing, break-even and partial closes for trades you take yourself.
Gold expert advisors
Gold EAs are some of the most sold and most risky. XAUUSD can move tens of dollars on a busy day, its spread widens sharply at the daily rollover and around US data, and a standard lot is 100 ounces, so a $10 move is $1,000 per lot. Before you trust any gold EA, check:
- Does every trade have a stop loss? If the EA adds positions without a stop, it's a grid or martingale, whatever the seller calls it.
- What was the worst drawdown in the test, in money and as a percentage, and how long did it last?
- Was it tested with real spreads, including the hour around the rollover and big news days?
- Does it trade during news? On a prop firm account that can break the rules even if the trade wins.
Size the risk per trade the same way you would by hand, with the XAUUSD lot size calculator.
How to backtest an EA in MT5
MT5's Strategy Tester runs an EA over past prices. It has four ways to model those prices:
| Modelling mode | What it uses | Good for |
|---|---|---|
| Every tick based on real ticks | The broker's actual recorded ticks | The most realistic test, especially for scalping and gold |
| Every tick | Ticks generated from minute bars | Most strategies when real ticks aren't available |
| 1 minute OHLC | Only the open, high, low and close of each minute | Quick checks of slower strategies |
| Open prices only | The open of each bar | Fast optimisation of EAs that act only on new bars |
- Set real costs: the spread you'll actually get, commission per lot, and swaps if trades are held overnight.
- Keep data back. MT5 can run a forward test on the last part of the period. Optimise on the first part, then see if the settings still work on data they've never seen.
- Distrust perfect curves. If changing a setting slightly turns profit into loss, the EA is fitted to the past, not built on an edge.
- Count the trades. Fifty trades prove little. Several hundred across different market conditions tell you much more.
- Then demo, then small. Run it on a demo account for weeks, compare it with the backtest, and only then consider live trading at small size, where it's legal for you. For Indian residents that means Indian exchanges through a broker API, not an offshore MT5 account.
Put the EA's win rate and average win and loss into the risk of ruin calculator to see how likely it is to hit a drawdown limit before it reaches a target.
Can you use an EA with a prop firm?
| Firm | EAs | Main limits |
|---|---|---|
| FTMO | Allowed | Warns that a widely sold EA may already be traded by others; caps orders at 200 open and 2,000 positions a day, and may ask you to change a hyperactive EA |
| FundingPips | Your own EA only | Third-party EAs only as trade or risk managers; bans HFT, latency arbitrage and VPS connections |
| The5ers | Allowed | You must own the source code; bans tick scalping, arbitrage and HFT |
| FXIFY | With approval on challenges | Banned on instant accounts |
| Alpha Capital | Trade managers only | MT5 only, with approval; no fully automated EAs |
| Goat Funded Trader | Your own EA | No third-party or 'pass the challenge' EAs; VPS banned on most accounts bought from 12 August 2026 |
| Maven | Not allowed | EAs aren't permitted on any platform |
| Blue Guardian | Allowed | Your own EA; no tick scalping, HFT or arbitrage bots |
| FundedNext | Accounts under $50,000 only | MT4 and MT5 only, with a paid add-on; no EAs built to pass challenges |
Two rules run through all of them: no EA that many other traders also run, because identical trades look like group trading, and no strategies that exploit slow price feeds. Read the full rules for GFT, The5ers, Alpha Capital and Maven.
How to spot a forex robot scam
Regulators keep warning about the same pitches. The US CFTC says plainly that "AI technology can't predict the future or sudden market changes", and that "claims of high or guaranteed returns are red flags of fraud". The SEC, NASAA and FINRA give examples of scam lines such as "Our proprietary AI trading system can't lose!". Walk away if:
- the seller promises a fixed monthly return or a 90%+ win rate,
- the "verified" results are screenshots, or the account is a demo,
- you're asked to deposit with a broker the seller chooses, or to share your login,
- the EA has no stop loss, or the seller won't say how it handles a losing run.
EAs and Indian traders
MetaTrader 4 and 5 appear on RBI's Alert List of unauthorised forex platforms, and trading forex with overseas brokers isn't allowed for residents, so running an EA on a live offshore MT5 account isn't a legal route from India. Automated trading on Indian exchanges is possible through your broker's API under SEBI's rules; algo trading in India explains how. For the platforms themselves, see forex trading platforms.