Forex Robots & Expert Advisors (EAs): An Honest Guide
What is a forex robot or expert advisor?
A forex robot, or expert advisor (EA), is a piece of code that runs inside a trading platform — most often MetaTrader, written in MQL4 or MQL5 — and opens, manages and closes trades automatically according to programmed rules. It removes hesitation and executes the same way every time, but it is only as good as the strategy coded into it. An EA automates a method; it does not turn a losing method into a winning one.
This guide covers the main strategy families, why some robots look flawless right up to the day they fail, how to test an EA properly and how to judge one being sold to you.
How an EA works
On each new price tick or bar, the EA checks its conditions — indicator values, price levels, time of day, open positions — and sends orders through the platform to your broker. The choice between MT4 and MT5 matters here: the two use different languages, and an EA written for one will not run on the other without being rewritten. Some EAs are fully automatic; others only manage exits, trail stops or size positions for trades you place yourself, which is less glamorous and often more useful.
To see real examples, browse the free ForexR EA Library of open-source MT4 and MT5 expert advisors. Our step-by-step EA guides then cover the types of expert advisors, how to install one and how to check whether an EA is safe.
Common strategy families
- Trend following — moving-average or channel logic that buys strength and sells weakness. Expect many small losses, occasional large wins and long flat periods.
- Mean reversion — fades stretched moves back towards an average, often in quiet hours. Frequent small wins, with the risk of large losses when a range turns into a trend.
- Breakout — trades the break of a session range or consolidation. Sensitive to spread and slippage because entries occur in fast markets.
- Grid — places orders at fixed intervals, adding to losing positions as price moves away and closing the whole basket when price pulls back.
- Martingale — increases position size after each loss, usually doubling, so that one win recovers all previous losses.
Why grid and martingale curves look smooth — until they don’t
Grid and martingale systems rarely book a loss. They hold and add to losers until the market retraces, so the closed-trade balance line climbs in a near-straight line while the real risk hides in floating drawdown. A martingale that starts by risking $10 and doubles after each loss has lost 10 + 20 + 40 + 80 + 160 + 320 + 640 + 1,280 = $2,550 after eight straight losers, and must now risk $2,560 to recover everything and finish just $10 ahead. The reward for surviving is tiny; the cost of not surviving is the account.

A grid behaves similarly. Suppose an EA buys 0.10 lots of EUR/USD every 20 pips as price falls. After ten entries and a 200-pip decline it holds 1.0 lot, and the positions are a combined 1,100 pips underwater — about $1,100 at roughly $1 per pip each. If the fall continues for another 200 pips, the full 1.0 lot loses a further $2,000 at roughly $10 per pip. One sustained trend with no pullback is enough, and because such moves are infrequent a grid can look flawless for a long time first. Always study the equity curve and maximum floating drawdown, not the balance line, and run the numbers through the drawdown calculator: a 50% loss needs a 100% gain to recover.
Backtesting pitfalls
A strategy tester makes it easy to produce an impressive report and hard to produce an honest one. The general principles are in our guide to backtesting and keeping a trading journal; for EAs, watch for these in particular:
- Curve fitting (over-optimisation). Run enough parameter combinations and some will fit past data perfectly by chance. Many inputs, oddly precise values and results that collapse when a setting is nudged slightly are the warning signs.
- Poor tick data. Tests built on interpolated one-minute bars misjudge movement inside the bar. This matters most for scalpers and any EA with tight stops or targets.
- Ignoring costs. A fixed, optimistic spread with no commission, slippage or swap flatters results. If an EA targets 5 pips and the real cost is 1 pip per trade, costs eat 20% of the gross target.
- Look-ahead bias. Code that accidentally uses information unavailable at the time — acting on the close of a bar that has not finished, or an indicator that repaints — produces results that cannot be reproduced live.
A sounder testing process
Split your history. Optimise on one portion (in-sample), then run the chosen settings untouched on data the EA has never seen (out-of-sample). Walk-forward testing repeats this in rolling windows: optimise on, say, two years, test on the next six months, roll forward and repeat, then stitch the out-of-sample segments together. If performance only exists in-sample, you have fitted noise. Prefer settings whose neighbouring values also work reasonably over a single sharp peak, and check results across trending and ranging periods.

Then forward-test: weeks to months on a demo account with your actual broker’s conditions, followed by a small live account, because demo fills are kinder than real ones. Compare live trades with a backtest of the same period; large gaps point to execution or data problems. Conditions vary between providers, so use our independent broker comparison to check spreads, commission and whether automated trading is permitted.
Running an EA on a VPS
An EA stops when your computer sleeps, reboots or loses its connection. A virtual private server (VPS) is a rented remote machine that keeps the platform running around the clock, ideally located near your broker’s servers to reduce latency. It is sensible for any EA that holds positions unattended, but you still need to check in: platform updates and dropped connections can silently stop a robot.
How to evaluate a commercial robot
Read our guide to forex scams alongside this checklist:
- A live, real-money track record verified by an independent third-party service — not screenshots, and not backtests alone.
- Meaningful length, ideally well over a year and covering different market conditions. A short history can hide a martingale or grid that has not met its bad month yet.
- Maximum drawdown measured on equity, plus visible lot sizes. Lots that grow after losses, or many simultaneous positions in one direction, reveal the hidden strategy.
- A stated, fixed risk per trade and a hard stop loss on every position.
- Clear refund terms and a way to test before committing significant money.
Warning signs include promised monthly returns, “no-loss” claims, countdown timers and fake scarcity, results shown only by the seller, pressure to use a specific unregulated broker, and managed-account offers attached to the sale.
The realistic role of automation
Used well, an EA enforces discipline. It takes every valid signal, never moves a stop out of fear, and lets you test an idea objectively — a practical answer to many of the problems described in our guide to trading psychology. But markets change, and a robot cannot notice that its edge has faded. You still need risk management at the account level: a cap on total exposure, a drawdown level at which you switch the EA off, and a periodic review against its tested expectations. The risk of ruin calculator shows what a given risk per trade implies over a long run of trades.
Automation is a tool for execution, not a money printer. Forex and CFDs carry a high risk of loss whether a human or a program presses the button. Only risk money you can afford to lose.
FAQ
Do forex robots actually work?
A robot executes whatever strategy it is coded with, so it works only as well as that strategy does in live conditions with real spreads and slippage. Automation brings consistency and discipline, not an edge by itself. Commercial robots often disappoint because they were over-optimised on past data or rely on grid or martingale sizing.
Why are martingale and grid EAs dangerous?
They add to or increase losing positions instead of accepting small losses, so closed-trade results look smooth while floating drawdown grows. Doubling a $10 stake after each loss means $2,550 lost after eight losers and $2,560 needed on the next trade. A single sustained trend without a pullback can wipe out an account.
How long should I test an EA before going live?
There is no fixed rule, but aim for a backtest covering several years and varied market conditions, out-of-sample or walk-forward checks, then weeks to months of demo forward-testing with your actual broker. Follow that with a small live account before scaling. The goal is enough trades to compare live behaviour with tested expectations.
Do I need a VPS to run an expert advisor?
Not strictly, but an EA only trades while the platform is running and connected. A home computer that sleeps, updates or loses internet will stop it. A virtual private server keeps the platform online around the clock and can reduce latency, which makes it sensible for any robot that holds positions unattended.