Rolling optimization starts from a fact most EA developers would rather ignore: the parameters you optimized last year were a measurement of last year’s market. Every algorithmic trader eventually meets the same quiet crisis. An Expert Advisor that backtested beautifully drifts out of sync with the market. Settings that produced a clean equity curve in 2023 produce drawdown in 2024. The usual fix, another backtest and another tweak, repeats the original mistake. The problem was never the parameters. It was treating them as permanent.
“A parameter set is not a discovery. It is a measurement. And like all measurements, it has an expiry date.”
At Quantum Rise Capital we build EAs on one principle: markets are non-stationary, so optimization has to be repeated, and every repetition has to be validated. This article explains the rolling optimization cycle we use, how to decide how often to run it, and how QRC Lodestar does the analysis part of each cycle for you.
Why static parameters decay
Most retail EA developers optimize once. They run the MT5 optimizer over historical data, sort by profit factor or net profit, and ship the top result. Some add walk-forward validation. Fewer add Monte Carlo stress testing. Almost none revisit the parameters once the EA is live.
That first optimization is a snapshot of one volatility regime, one correlation structure between assets and one macro environment. When those change, and they always do, a static EA keeps firing the same signals with the same thresholds into a different market. The gap between backtest and live results that follows isn’t bad luck. It’s built into the way the EA was made.
What rolling optimization is, and what it isn’t
Rolling optimization means re-optimizing your EA on a schedule, over a window of recent data that moves forward each time, and validating the result on data the optimizer never saw before it goes live. It’s the live version of walk-forward analysis. Walk-forward testing proves the process works on history. Rolling optimization keeps running that process as new data arrives.
Done badly, rolling optimization makes things worse. If every cycle grabs the single best pass, you aren’t adapting to the market. You’re refitting noise every month and deploying a different accident each time. So the method you use to pick parameters matters more than the schedule you run it on.
The QRC rolling optimization cycle in 5 steps
1. Optimize on a recent window sized by trades
Each cycle starts with an MT5 genetic algorithm sweep over a recent in-sample window. We size the window by trade count, not calendar time: at least 200 trades in-sample, which usually means 24 to 36 months for an H1 system and around 12 months for an M5 or M1 scalper. Risk and compliance settings such as the daily loss halt and equity watchdog are declared as inputs the optimizer can’t see, so no cycle can quietly loosen them. Every EA scores its own passes with a composite fitness function in OnTester().
2. Score only distinct results
All passes are exported from MT5 as XML. A genetic optimizer revisits the same result many times, varying inputs that don’t change anything, so duplicates get collapsed first. Counting them as separate evidence makes a weak region look crowded with winners.
Each distinct result then gets a composite score: profit factor 30%, recovery factor 25%, Sharpe ratio 25% and low drawdown 20%. The weights are applied to percentile ranks rather than raw values. On raw values, drawdown’s real influence shrinks to almost nothing because the metrics sit on different scales.
3. Cluster, then pick a pass that was actually tested
The scored results are grouped with k-means++ clustering into performance profiles. We’re looking for a broad region where many neighbouring settings perform well, not one tall spike. If the EA is headed for a prop firm, profiles whose drawdown breaks that firm’s maximum loss are filtered out.
From the chosen profile, we deploy the real tested pass closest to its centre. Earlier versions of our pipeline took the median of each parameter instead. We stopped, because medians calculated one input at a time can combine into a parameter set that was never run, and they can blend two different parameter families into something neither of them would produce.
4. Refine only the inputs that matter
Next, each input gets an impact score using permutation importance: shuffle one input’s values and measure how much the composite score suffers. High and medium-impact inputs are refined within ±20% of the recommended pass, on the same in-sample window. Low-impact inputs are fixed. Inputs that provably do nothing, where passes differing only in that input give identical results, are frozen or removed from the code. Every input you remove is one less way for the next cycle to fit noise.
5. Pass the out-of-sample gate once
The final set runs once on the block of data that follows the in-sample window. It either holds up or it doesn’t. If it fails and you retune, that out-of-sample block has been used, and from then on it counts as in-sample. Sets headed for a prop firm also go through a Monte Carlo resampling of their trades to estimate pass and breach probabilities. Only then does the set go live, and the next cycle rolls the window forward.
How often should you run rolling optimization?
Don’t pick a cadence from a calendar. Get it from your own walk-forward results. If the edge holds for about six months after each optimization and fades after that, re-optimize every six months. Many H1 swing systems end up on a six-month step, and scalpers on shorter timeframes usually need a faster one. Our guide to progressive backtesting explains how to run the walk-forward test that gives you this number.
Watch how far the chosen settings move between cycles. If they stay in the same neighbourhood, the market is shifting slowly and rolling optimization is doing its job. If they jump around, say a 14-period ATR one cycle, 48 the next and 9 after that, the edge may be gone, and re-optimizing harder won’t bring it back.
A regime layer for the gaps between cycles
Rolling optimization handles slow drift. Markets also switch faster than that, between trending and mean-reverting behaviour and between quiet and volatile sessions. Several QRC EAs add a regime layer that classifies the current state as trending, ranging or transitional, using measures such as ADX and ATR, and adjusts entry thresholds within the deployed set without waiting for the next cycle.
The two layers work together: periodic re-optimization at the macro level and regime detection at the micro level. One caution applies. A regime layer adds inputs, and inputs are where overfitting lives, so it goes through the same scoring, impact and out-of-sample steps as everything else.

What rolling optimization means for prop firm traders
FTMO’s 2-Step Challenge no longer has a time limit, but the parameters you start a challenge with still decide how it goes. A set calibrated on recent data and validated out of sample starts closer to current conditions than one optimized two years ago and never revisited.
Prop firm accounts rarely die from one bad trade. They die from slow drawdown accumulation: an EA firing signals that no longer fit the market, losing a little each week until the daily or maximum loss limit is in reach. Rolling optimization reduces that risk by keeping the EA’s core behaviour calibrated as close to the present as your cadence allows.
Your safety rules shouldn’t roll with it. Hardcoded daily loss limits, equity-based lot sizing and static drawdown watchdogs stay fixed from cycle to cycle, and our FTMO Challenge EA guide covers how to set them. Rolling optimization is what stops those safety limits from becoming your only line of defence against an EA that has drifted out of sync.
How QRC Lodestar runs the analysis for each cycle
Steps 2 to 5 are where most traders give up on rolling optimization. Done by hand, they mean a long afternoon in a spreadsheet every cycle, and by the third cycle the selection is drifting with the trader’s mood. We built QRC Lodestar so that the same method runs the same way every time.
You load the optimization export, either an MT5 or MT4 XML file or another platform’s results table. Lodestar removes duplicate passes, scores distinct results on the rank-normalised composite, clusters them into performance profiles with k-means++ and recommends a real tested pass at the centre of the best one. It scores the impact of every input and flags the ones with no effect, which tells you exactly what to refine and what to freeze in step 4. For step 5, it compares in-sample and out-of-sample results, runs a drawdown-calibrated Monte Carlo for FTMO or The5ers, and screens the trades against prop firm rules. Every cycle ends with a PDF report you can file next to the previous one, so you can see whether the chosen settings are holding steady or wandering.
The Lodestar demo includes every module for three validations, enough to run one rolling optimization cycle on an EA you know well and judge the output yourself. You can download it from the QRC Lodestar page: https://www.quantumrisecapital.ae/qrc-lodestar-backtest-valuation/
A minimal rolling optimization routine you can start this month
You don’t need our infrastructure to start. You need MT5 with the Strategy Tester, a fixed schedule and a selection rule that values robustness over peak performance.
- Optimize on a recent in-sample window with enough trades, at least 200 if you can get them.
- Score the passes on at least profit factor and maximum drawdown together, never on net profit alone.
- Choose a pass from a stable region where nearby settings also perform, not the top of the table.
- Run it once on unseen out-of-sample data before it goes anywhere near a live account.
- Write down the settings you chose and compare them with the next cycle’s.
The discipline is in the cadence. Put the date in your calendar and run the cycle, even when last cycle’s parameters are “still working”. By the time you notice they’ve stopped working, you’re already in drawdown.
Rolling optimization isn’t a trading edge in itself. It’s the maintenance that keeps a real edge working while the market changes underneath it, and it’s the standard every QRC Expert Advisor is developed and maintained to.
Trading leveraged products carries a high risk of loss. Optimization and backtesting reduce the risk of deploying a broken strategy, but they don’t guarantee future results.
Sources:
- MetaTrader 5 Help: Strategy Optimization
- MetaTrader 5 Help: Optimization Types
- scikit-learn: Permutation feature importance
- The probability of backtest overfitting (Bailey, Borwein, López de Prado, Zhu)
- FTMO 2-Step Challenge
