← All Insights Insight

What Is an Expert Advisor? Forex Robots, Explained

InsightSterling Capital Technologies
FIG 25SMOOTH IS NOT SAFEILLUSTRATIONONE LOSING RUNFIXED RISKMARTINGALE: LOOKS PERFECTMARTINGALEsmooth, then a cliffFIXED RISKbumpy, still standingTHE TESTlive, broker-linked recordTHE TERMINALhas to stay on
FIG 25SMOOTH IS NOT SAFEuntil it ends

An Expert Advisor is a program that trades for you inside MetaTrader. That part is simple. The hard part is telling the rare useful one from the many that look perfect on a chart until the day they do not. Here is how an EA works, what it can and cannot do, and the standard of evidence that separates the two.

What an EA actually is

An Expert Advisor (EA) is a small program that runs inside the MetaTrader trading terminal and places, manages and closes orders according to fixed rules. On MetaTrader 4 (MT4) it is written in a language called MQL4. On MetaTrader 5 (MT5) it is written in MQL5. The rules might be as plain as “buy when the 20-period average crosses above the 50-period average, place a stop 30 pips away, close at a fixed target.” They might also be hundreds of lines of conditions. Either way, the EA does exactly what its code says, every time the conditions are met.

“Forex robot” is the marketing name for the same thing. Robot suggests intelligence. An EA has none of its own. It has rules, and it follows them without hesitation, fatigue or second thoughts. That is its strength, and it is also why a bad set of rules gets executed just as faithfully as a good one.

If you want the wider picture first, our guide to what algorithmic trading is covers the category. This article is about the specific artifact most retail traders actually meet: the EA file you download, rent or buy.

How it runs, and why the terminal has to stay on

An EA does not live on your broker’s server. It lives inside your copy of the terminal. You attach it to a chart, and it reads prices from that chart and sends orders through your account. To let it trade, MT5 needs two switches on: the Algo Trading button on the terminal toolbar (called AutoTrading on MT4), and the permission to trade in the EA’s own settings. With the toolbar button off, no EA on that terminal can place a trade.

The practical consequence is easy to miss. If the terminal is closed, the computer goes to sleep or the internet drops, the EA stops. Any open positions stay open at the broker, but nothing is watching them except whatever stop loss was already placed. This is why EA users often run the terminal on a virtual private server (VPS): a rented machine in a data centre that stays on around the clock. MetaQuotes, the company behind MetaTrader, offers its own virtual hosting service inside the platform, and many third-party VPS providers offer the same kind of setup.

None of this is a flaw. It is simply how the software works. But it means “set and forget” is never quite true. Someone still has to make sure the machine running the rules is running.

What an EA can and cannot do

An EA is good at a narrow set of jobs:

  • Consistency. It applies the same rule the same way on the thousandth trade as on the first.
  • Speed and attention. It can watch many charts at once and react to a new price within milliseconds, far faster than a person watching a screen, at any hour the market is open.
  • Discipline on risk. If the code says every trade risks a fixed fraction of the account, it will not “just this once” risk more.
  • Testability. Because the rules are written down, they can be run against historical prices in MetaTrader’s Strategy Tester to see how they would have behaved.

What it cannot do matters more:

  • It cannot know that the market has changed character. A trend rule keeps trading trend setups in a sideways market until its losses tell you something is wrong.
  • It cannot make a weak idea strong. Automation removes execution errors. It does not add an edge that was never there.
  • It cannot protect you from its own design. If the logic doubles down on losers, it will do so perfectly, all the way to the end.
An EA is a multiplier. It multiplies whatever quality its rules already have, good or bad, with perfect obedience.

Why the marketplace is full of bad ones

EAs are cheap to build, easy to copy and simple to sell with a chart. Three patterns explain most of the bad ones.

Curve-fitting

The Strategy Tester lets a developer run a rule set against years of past data and adjust its settings until the result looks excellent. Push that far enough and the settings stop describing a real market behaviour. They describe the specific noise in that specific stretch of history. This is called curve-fitting, or over-optimisation. The backtest looks smooth because it was shaped to fit the past. The live market has no obligation to repeat that past, and usually does not.

Backtest-only results

A backtest is a simulation. It uses historical prices and assumptions about spreads, slippage (the gap between the price you asked for and the price you got) and execution. Real accounts meet widening spreads around news, requotes and broker differences that a simulation smooths over. A seller who shows only backtests is showing you the version of the product that never had to meet a real market. Official marketplaces such as the MQL5 Market let you download a demo of a paid EA and run it in the Strategy Tester yourself, which is useful for inspecting its behaviour. It is still a backtest, and it still tells you nothing about how the EA handled live money.

Martingale and grid systems

This is the pattern that produces the most beautiful equity curves and the most sudden account wipe-outs. A martingale system increases position size after a loss, usually doubling it, so that one winning trade recovers every previous loss plus a small profit. A grid system opens additional positions at fixed intervals as price moves against it, averaging into the loser. Both win very often. Both hide their risk in the rare losing streak.

Here is the arithmetic. The figures are illustrative only, and assume about $10 per pip per standard lot (1.00 lot), which is roughly true for a pair like EUR/USD on a US-dollar account.

  • The first trade is 0.01 lots. It aims for 20 pips and risks 20 pips.
  • After each loss, size doubles: 0.01, 0.02, 0.04, 0.08, 0.16, 0.32, 0.64. The size after n losses is 0.01 x 2n.
  • After seven losses in a row, the total volume lost on is 1.27 lots. At 20 pips each, that is a cumulative loss of $254. The eighth trade is now 1.28 lots.
  • If that eighth trade wins its 20 pips, it makes $256. Net result of the whole sequence: plus $2. The same $2 the first 0.01-lot trade was aiming for.
  • If the streak runs to ten losses, the cumulative loss is 10.23 lots x 20 pips x $10 = $2,046, and the next trade must be 10.24 lots just to win back $2 overall.

Notice the shape. Risk grows geometrically. Reward stays flat. Most days the system wins its small amount, and the curve climbs in a near-perfect line. Then one unbroken trend, one news spike or one margin limit arrives, the account cannot fund the next doubling, and months of small gains disappear in a single sequence. A curve like that is not evidence of skill. It is evidence that the bad day has not happened yet.

You cannot always spot this from a backtest, because a test period without a long enough losing streak shows only the climbing line. You spot it from position sizes that grow after losses, from a drawdown figure that is small on average but enormous at its worst, and from the absence of a stop loss on individual trades. Our piece on verified vs unverified results and the red flags to watch for goes further into how this shows up in the numbers.

The evaluation standard

Instead of asking “is this EA good?”, ask whether it meets a standard of evidence. Before you trust an EA with real money, it should clear every point below.

  • A verified live record. Results tracked by an independent third party connected directly to the trading account, not screenshots and not a spreadsheet from the seller. Our guide on how to read a Myfxbook track record walks through what verification does and does not prove.
  • Real money. A demo account costs the developer nothing to run and nothing to abandon. A live account shows execution under real spreads and slippage.
  • Drawdown disclosed. Drawdown is the fall from a previous equity peak to the lowest point before a new peak. The maximum drawdown tells you what holding the EA actually felt like at its worst. If it is hidden, rounded away or described only as an average, treat that as the answer.
  • A sample long enough to include a bad regime. A market regime is a stretch with a consistent character: trending, ranging, calm or volatile. An EA that has only lived through one kind of market has not yet been tested. Look for a record that has survived at least one period that plainly did not suit it.
  • Visible trade sizing. Look at the trade history, not just the curve. Position sizes that climb after losses, or clusters of positions opened against the move, are the fingerprints of martingale and grid logic.

An EA that meets this standard may still lose money. The standard does not promise a good outcome. It promises that you know what you are holding before you hold it.

So, are forex EAs profitable?

The honest answer is: some are, most are not, and you can usually tell which group a given EA belongs to before you risk anything, as long as you insist on evidence.

That answer frustrates people because it is neither a yes nor a no. But the question “are EAs profitable?” is like asking whether businesses are profitable. The category does not have a result. Individual products do. The distribution is heavily weighted towards failure, because building an EA is easy and building one with a durable edge is hard. The minority that do hold up tend to share the same traits: modest, consistent sizing, disclosed drawdown, a long live record through difficult conditions, and returns that look plausible rather than spectacular.

When a result looks too smooth, the most useful question is not “how do I get this?” It is “what would have to happen for this curve to break, and has that happened yet?”

Key takeaways

  • An EA is a program written in MQL4 or MQL5 that trades under fixed rules inside a running MetaTrader terminal. If the terminal stops, the EA stops.
  • Automation adds consistency and discipline. It does not add an edge that the rules do not already have.
  • Curve-fitted backtests, backtest-only marketing and martingale or grid logic account for most of the EAs that fail.
  • Martingale risk grows geometrically while the reward stays flat, which is why its curves look perfect until they end.
  • Judge any EA by a verified live record on real money, disclosed maximum drawdown, and a sample long enough to include a bad market regime.

This article is educational and is not financial advice, a recommendation, or an offer. Trading foreign exchange and CFDs carries a substantial risk of loss, including the loss of your entire investment, and losses are a common outcome. Automated trading does not remove that risk. Any figures used above, including the lot sizes, pip values and dollar amounts in the martingale example, are illustrative only and do not describe any real product, account or result. Past performance is not a guarantee of future results. Consider your own circumstances and seek independent professional advice where appropriate.

Keep building the standard

Every Insight is written to help you ask better questions of any strategy, automated or not. Read the numbers, not the promises.

Browse all Insights

Keep reading

More Insights.

Plain-English explainers on how markets and trading costs really work.

Founders Call Application

01 · About you

02 · Your investing

03 · Your call

Allocations of $100,000 or more are invited to a private call with the founders.