Learn

Optimized EA or Curve Fit? How to Tell Before You Trust It

At a glance

A curve fit is an EA whose settings were tuned until they match one stretch of history, so the backtest describes the past it was tuned on rather than anything repeatable. You cannot tell from the equity curve alone. Five checks separate an optimized EA from a curve fit: how many settings were tried against how many trades, whether the neighbours of the chosen setting also work, whether the rules still hold on a period they were not tuned on, whether the result survives other markets and costs, and whether the seller can show every attempt. In three of our own test series a tidy result did not carry over unchanged: an earlier exit set beat the tuned one on more than 12 years the tuned one had never seen, a simulator candidate fell from about +72 R to +34 R in the MT5 tester, and a grid peak turned out to come from one sub-period.

On this page

An optimized EA and a curve-fitted EA can show the same equity curve. The difference lies in how the settings were chosen and in what happens when the rules meet data they were not tuned on. The curve cannot tell you. The record of how the result was produced can.

This guide gives you five checks you can run on your own backtest or ask a seller about, and then shows three cases from our own testing in which a tidy result did not carry over unchanged. It does not review a named third-party EA and it does not give a number of trades or years that makes an EA safe.

Disclosure: RoboXpert develops trading software. The cases below come from our own products, Daybreak and Session Break, and from research tests around them. They show how we test; they do not prove that any of our products will earn money. We name no rule values of our products. AI assisted with research and drafting. See our editorial disclosure.

Five checks for a curve-fit EA

Scroll horizontally if needed

#CheckWhat a curve fit looks likeWhat you want to see
1Settings against tradesMany tuned settings, few tradesFew settings, many trades from different market conditions
2Neighbours of the chosen settingOne sharp peak, the next cells much worseA broad area of similar results around the choice
3A period held back from the tuningGreat on the tuned years, flat or negative afterwardsSame rules, frozen before looking, still positive on the unseen period
4Other markets, data and costsWorks on one symbol, one data source, one cost levelSmaller but same-direction results on neighbouring tests and higher costs
5The list of attemptsOnly the best run is shownEvery variant tried, including the ones that failed

What curve fitting is and why an optimizer produces it

Optimization means letting the tester try many combinations of an EA's inputs and rank them by a result. That is legitimate work: MetaTrader's own documentation describes a forward partition whose stated purpose is to avoid parameters fitted to particular stretches of data (MetaQuotes). The risk is in the selection. Any ranking has a top, and with enough combinations the top is partly luck: noise in one stretch of history that will not come back.

Our hypothetical selection model shows the same mechanism with no edge at all: try enough candidates and one of them will look like a winner. The research literature calls the general problem backtest overfitting (Bailey et al.). Our model does not implement that paper's statistic.

Every additional variant you try, whether by hand, by the optimizer or by asking an AI assistant for another version, is another draw from that selection. Fast code generation makes more draws cheap. It does not make any single result more reliable.

Check 1: count the settings against the trades

Each tuned input is a degree of freedom. An EA with a few settings and hundreds of trades spread over different market conditions has little room to memorize history. An EA with many tuned settings and a few dozen trades has a lot.

Count three things: how many inputs were optimized, how many combinations the optimizer tried (the product of the ranges, not only the winning row), and how many independent trades the result rests on. Trades that belong to one basket or overlap in time are not independent observations; our Myfxbook guide makes the same point about records.

There is no universal ratio. The check is relative: the more combinations were tried and the fewer trades support the winner, the more the result should be treated as a hypothesis.

Check 2: look at the neighbours, not the peak

Take the chosen setting and look at the cells one step above and below it, for every optimized input. If the neighbours earn about the same and risk about the same, you are on a plateau: the idea does not depend on the exact value. If the chosen cell is far better than all its neighbours, you are probably looking at noise that the optimizer found.

A plateau does not prove a robust edge: the whole area can be tuned to the same stretch of history. It is a necessary check, not a sufficient one, which is why the next check exists.

Check 3: hold back a period and do not reuse it

Split the history in time. Tune on one part. Freeze the rules and the chosen inputs. Then run the other part once. MT5's forward option does this inside the tester: optimization uses the earlier portion and the chosen sets are then evaluated on the later one. Both portions are historical, so this is a historical out-of-sample check, not a demo or live record (difference explained here).

The held-back period only works while it stays unseen. If you look at it, change something and look again, it has become part of the tuning. Be careful with this in your own work and ask for it from a seller: how many times was the second period run, and was anything changed in between?

Also look at the years one by one. A result that sums to a large number but rests on one or two good years is a weaker claim than the same sum spread over most years.

Check 4: change the market, the data and the costs

A real market behaviour usually leaves some trace on neighbouring conditions: a similar symbol, another data source, a different broker's price history, a wider spread. The result will usually shrink, but it should not change sign without explanation. Costs matter most for frequent trading; our cost-sensitivity guide shows how to find the cost level at which an average result reaches zero.

Test with one fixed cost assumption over the whole period and change it as a deliberate step, rather than letting the spread vary between runs, so that a difference between two tests cannot come from the cost model.

Check the data too. A time-zone or session-boundary error in a price source can make a time-based strategy look different without any change in the strategy. We hit exactly this in our own tests (see below).

Check 5: ask for the list of attempts

The most informative document an EA developer can show is the list of things tried and discarded. A seller who shows one equity curve and no failed variants gives you no way to estimate the selection that produced it. Ask for the tested periods, the number of variants, the rejected ones and the reason, and which period was used for choosing and which for checking.

If the answer is a set of screenshots of the best run, treat the result as a hypothesis about the past.

Three of our own tests where a tidy result did not hold

These are results from our internal test log, dated, with the rule values left out. Results are in R: profit divided by the amount risked per trade, so that tests at different account sizes can be compared. In the Session Break tests, 1 R equals 0.5% of the account. Test periods and symbols are given per case. The price data for the long periods before September 2022 is a third-party source used only for internal tests; we do not publish it.

Case 1: exits tuned on 2022–2026 lost on the 12 years before

We optimized the exits of Daybreak's gold variants in the MT5 optimizer on real ticks from July 2022 to October 2026, choosing on the first part and checking on the second part (our rule: a setting counts only if it is better in both halves and its neighbours are too). The tuned exit set was better on that period. On 2010 to August 2022 data it was not:

Scroll horizontally if needed

Gold, 2010 to 08/2022Result with realistic slippageDrawdown
Earlier exit set+115 %35.5 %
Exit set tuned on 2022–2026−23 %53.0 %

Slippage was scaled to the gold price. We read it as evidence that the tuned exits were fitted to the recent period, and on 9 November 2026 a later release put one gold variant back to the earlier exits. One caveat the log is clear about: the older period is a different data source and different market regime, so the gap says "does not carry over", not "the old rules are right".

Case 2: a plateau for gold, none for Bitcoin and the yen

For Session Break we tested a volatility filter that pauses gold trading when recent daily ranges are small. Two inputs, 132 to 180 combinations per data set, run in the MT5 optimizer on real ticks.

  • Gold: a block of neighbouring combinations helped. On 2010 to August 2022, gold without the filter made about +18.5 R with a 35.8 R drawdown; inside the block it made between +28 and +40 R at about 20 to 25 R drawdown. The worst sub-period, 2015 to 2019, went from about −21 R to about zero. On 2022 to 2026 the result stayed about level or slightly better (roughly 48 R without the filter against 47 to 55 R) with a lower drawdown.
  • One strong cell: a short-window setting looked excellent on its own (up to about +50 R at 12 R drawdown on the older period) but its neighbouring settings did not. We did not use it.
  • Bitcoin and the yen: the same filter on the same kind of grid showed no plateau. For Bitcoin, any threshold that reduced the drawdown cost more profit than it saved. We did not use it there.

Limits: we picked the gold block with all periods in view, so the later periods were not untouched. The four candidates inside the block differed from each other by less than the noise, so we took the middle of the block rather than the highest cell.

Case 3: a simulator candidate that halved, and a grid peak that was one sub-period

Session Break's Bitcoin test also looked at a second trading window around the US open. A fast simulator found a plateau. With costs that scale with the price it was positive in all four sub-periods; with fixed costs it showed about +72 R over 2022 to 2026. We then ran it in the MT5 tester on real ticks: +34.4 R over the same period, with its own drawdown of 21.6 R, too weak to justify a separate market. The window was not adopted.

Inside the MT5 grid for that window, one end time looked best of all (46 to 75 R). We cross-checked it in the simulator across sub-periods: its advantage came from one sub-period, was absent in the 2017 to 2022 data and small in the most recent one. We read it as a period effect, not a robust gain.

A data check that changed an earlier conclusion

On 6 November 2026 we found that our third-party history for gold and the yen had been converted with a fixed winter offset while the data followed daylight saving, so the data was an hour off in summer. We rebuilt the symbols and repeated the affected tests. Gold 2015 to 2017 changed from a loss to about zero; none of the decisions we had drawn from the old data flipped, but one finding became stronger and another weaker. Results on the later tick data used for the products were not affected. The lesson for you is simple: a backtest can mislead through data as well as through settings, and a good tester repeats the test after fixing it.

Questions to ask before you trust an optimized EA

  1. How many inputs were optimized and how many combinations did the optimizer try?
  2. How many trades support the result, and from how many different years or market conditions?
  3. What do the cells next to the chosen setting look like? Ask for the grid.
  4. Which period was used for choosing, which was held back, and how often was the held-back period run?
  5. What happens on another symbol, another data source and a higher fixed cost?
  6. Which variants were tried and rejected?
  7. Is the result a backtest, a historical holdout, a demo forward test or a live record? The backtest versus live guide separates them.

If the answers are missing, the honest conclusion is "not established", not "curve fit". A missing answer leaves the question open; it does not prove the result false.

Frequently asked questions

Is every optimized EA a curve fit?

No. Choosing inputs with an optimizer is normal. What matters is how many options were tried, whether the choice sits on a plateau, and whether it holds on data that did not take part in the choice.

How many trades are enough?

There is no number that makes an EA safe. More independent trades from different market conditions give the result more weight. Overlapping trades from one basket count as one observation more than as hundreds.

Does walk-forward testing remove the risk?

It reduces it if the later period stays unseen. If you adjust the rules after seeing the later period, that period has become part of the tuning. A historical forward test is also still historical data, not a live record.

Does a verified live record settle it?

It answers a different question: whether the account and its history are real. It does not tell you how many versions were tried before the EA you see was chosen, nor which software made the trades. See How to verify EA results on Myfxbook.

Scope and sources

Written on 20 November 2026. The five checks are our working method, explained in our own words. The three cases come from our test log under the dates named; rule values are withheld. Numbers from the log were not re-run for this article. The two linked sources were cited as already used in our other guides and not re-opened for this article. We did not measure market-wide rates of overfitting or review any third-party EA. This article does not recommend an investment.

Friendly robot illustration representing the RoboXpert pen name.
AI-generated avatar

About the author

RoboXpert

Pen name

The person behind RoboXpert writes about expert advisors, trading evidence and programming, and develops their own trading software. They report 10 years of experience in these areas; this is self-reported, not an independently verified qualification or performance record.

Sources & further reading

Your next question

Continue reading

Testing & evidence

Backtest vs Live Trading: What EA Results Really Show

See what a historical holdout, a demo forward test and a live record each add after you have checked for curve fitting.

Read the guide →
Testing & evidence

Trading Cost Sensitivity: How Much Cost Can a Strategy Survive?

Run the cost check from this guide on your own backtest.

Read the guide →