Simplify Overfit Expert Advisor: Cut Dead Indicators
An expert advisor that looks immaculate in the strategy tester and behaves like a different product on a funded account was usually fitted to a stretch of history rather than to a behaviour that repeats. The culprit is rarely the entry logic. It is the filters bolted on afterwards, each added because it cleaned up an ugly patch in the backtest. Here is how to simplify overfit expert advisor logic: count what you are really fitting, find which components carried weight, and cut the rest.
What does it mean when an expert advisor is overfit?
An EA is overfit when its rules describe the specific price history it was tuned on rather than a behaviour that repeats. It scores well on the data used to build it and gets worse on data it has never touched, because the settings were chosen with that history already visible.
Overfitting is not a coding error. It is the default outcome whenever you search a large space of settings against a fixed sample. The optimiser is not hunting for an edge; it returns whatever scored highest on the file you handed it, whether or not an edge exists there. Your main lever against that is the size of the search space.
How many parameters is too many for an expert advisor?
There is no fixed limit, but the honest test is the ratio between tunable parameters and the number of independent trades the test produced. When each parameter has only a handful of trades behind it, the settings are describing individual trades rather than a pattern.
The things that quietly inflate the count:
- Most indicators arrive with more than one knob: a period, a level, a smoothing method, often a timeframe and an applied price on top.
- Filters that block entries shrink the trade sample, so you fit more knobs to less evidence at the same time.
- Hard-coded values are still parameters: a session window, a spread ceiling, a minimum candle body, a fixed stop distance. If you picked the value by testing it, it counts.
- Parameters that interact are worse than ones acting alone, because the optimiser can trade one off against another and hide that neither does anything on its own.
Most EAs described as having a few settings carry far more once the hard-coded ones are listed.
How do I know if an indicator is actually doing anything?
Judge it on data it was never tuned on, and require a plain reason for it to exist. A large search will reliably turn up settings that improve the past even on structureless data, so an improvement that shows up only in the window where the setting was chosen is evidence about your search, not about the market.
The curve did improve when the filter went in, but it improved on that file. Before you keep a component, write one sentence describing what market behaviour it avoids or exploits. If the best you can manage is that it skips the bad period in the middle, you have curve fitting with extra steps.
Two cheap checks before you keep anything:
- Look at the neighbourhood, not the peak. Nudge the setting up and down. A robust effect degrades gently. A fitted one falls off a cliff, because the peak was sitting on a few specific trades.
- Check whether the component still helps on another symbol, another period, or an adjacent timeframe. Nothing has to work everywhere, but a filter that helps in exactly one place has not earned the parameter it costs you.
How do I remove indicators from an EA without breaking it?
Turn one component off at a time, leave every other setting frozen, and compare the result on history it was never tuned on. Anything that does not clearly improve that comparison comes out of the code permanently.
Split the history into three windows first, because the removal work consumes one of them:
- A build window, where optimisation happens.
- An ablation window, where keep or cut decisions get made. Every comparison touches it, so treat it as spent once you are finished.
- A final window you do not open until the trimming is done, and then look at exactly once.
Then work in order:
- List every component and every parameter it owns: entry trigger, each filter, exit logic, sizing, session gates, news gates, hard-coded thresholds.
- Run the full system on the build and ablation windows and record that as the baseline.
- Disable one component, change nothing else, and do not re-optimise the survivors yet.
- Re-run both windows and compare the shape of the curve, not only the bottom line: trade count, distribution of losers, worst stretch, behaviour in quiet and fast conditions.
- Keep the component only if it earns its place on the ablation window and you can explain the mechanism in one sentence. Otherwise delete it from the code, not just the inputs.
- Repeat for each component, then re-run the survivors together, since removals interact and a filter that looked useful may have been covering for one you already cut.
- Re-optimise the trimmed system on the build window alone, then run a walk-forward pass so settings are chosen forward in time rather than in hindsight.
- Open the final window once, at the end. If you change anything because of what you saw there, that window is spent too.
Log every variant you tested. The count is part of the evidence: a result that survived a handful of honest comparisons is not the same as one picked from a huge sweep.
Should I re-optimise the EA after removing a component?
Yes, but only on the build window, and only once the cutting is finished. If you re-optimise after every removal and check your untouched data each time, that data becomes part of the training set and stops telling you anything.
When you do re-optimise, choose from the middle of a broad region of decent settings rather than the single best cell in the grid. The middle of a plateau survives a shift in spread, a different broker feed, and a market that changes character. The peak usually does not.
What do I gain from running a simpler EA?
A simpler system fails in ways you can diagnose. With few rules you can look at a short run of trades and say whether the behaviour matches the design or whether conditions genuinely changed. That is impossible once many filters interact.
The rest of it is practical:
- Fewer settings to get wrong when you move to a different broker, symbol suffix, contract size, or server time zone.
- Less exposure to the gap between tester conditions and your broker's real spread, commission and slippage. A filter tuned near a threshold is where a slightly worse fill flips the decision.
- Behaviour you can describe in advance, which lets you sit through a losing stretch instead of intervening at the worst moment.
Does a simpler EA help with a prop firm evaluation?
It makes the system easier to check against the rules honestly, and nothing more. No EA can promise a pass, and cutting parameters does not change the constraints you trade under.
Firms impose rule types rather than one shared standard: daily loss limits, an overall drawdown limit that may be static or trailing, consistency or best-day rules, minimum trading days or time limits, and restrictions around news events and weekend holds. The specifics differ by firm and change without much notice, so check the current terms of the firm you are with before assuming a system fits.
If you later run the same trimmed system on more than one account, the practical setup is one tested configuration copied out rather than hand-tuned versions per account. The JPTC EA Hub runs on MT4 and MT5, and the trade copier supports many platforms including MT4, MT5, cTrader, DXtrade and TradingView, so the platform does not force your hand. You run everything on your own account at your own broker, and JPTC holds no funds and has no withdrawal access.
Before deciding what to keep in your own EA, read the research notes: out-of-sample testing on gold and forex systems, including the candidates that did not survive. The results page shows how a documented system is presented rather than described.
Automated forex and gold trading
Runs on your own account at your own broker. We host and set it up, so there is nothing to install and no VPS. No profit share, no monthly fee.
See how it works