Specialist algorithmic trading developers since 2020 — MT4/MT5 EAs, Pine Script, trade copiers, and risk automation for traders in 15+ countries. View our services · Contact us
A backtest showing 300% annual return and 5% drawdown is often worthless — it may be curve-fitted to past data and will collapse live. Serious traders and developers validate strategies with methods that stress-test robustness. Here's how to backtest an Expert Advisor without fooling yourself.
What Is Curve Fitting?
Curve fitting (overfitting) means optimizing so many parameters against historical data that the EA memorizes noise instead of learning repeatable market behavior. It looks perfect in the tester and fails the first month live. More parameters + more optimization passes = higher overfitting risk.
Use Quality Tick Data and Realistic Costs
- Test on tick data or high-quality every-tick mode, not coarse OHLC only
- Set spread to average or worst-case for your broker and session
- Include commission and realistic slippage (1–3 pips for forex if applicable)
- Match account type: hedging vs netting on MT5
Walk-Forward Optimization
Split history into segments. Optimize on in-sample period A, then test frozen parameters on out-of-sample period B. Roll forward and repeat. If performance collapses on out-of-sample segments, the strategy is likely overfit. Professional developers report walk-forward efficiency, not just raw profit.
Monte Carlo and Stress Tests
Monte Carlo shuffles trade order or perturbs results to see if equity curve depends on lucky sequencing. Stress tests widen spread or add slippage spikes. Robust strategies degrade gracefully; fragile ones fall apart immediately.
Forward Testing on Demo
No backtest replaces live market microstructure. Run the EA on demo with real spreads for at least 2–4 weeks (longer for swing systems). Compare live fills vs tester assumptions. Only then scale to funded or prop accounts.
Huge profit factor with tiny trade count, parameters with many decimal places, or a developer who only shows one equity curve and refuses walk-forward reports.
Metrics That Matter More Than Net Profit
- Profit factor and expectancy across out-of-sample windows
- Max drawdown and recovery time
- Win rate stability across years, not one trending year
- Trade count — enough trades for statistical meaning
- Sensitivity — small parameter changes shouldn't flip strategy from hero to zero
Need this built for your strategy?
Nowzana builds custom MT4/MT5 EAs, Pine Script, trade copiers, and risk systems for traders worldwide. Free consultation — response within 4 hours.
Get a Free Quote →