Optimization
Sweep strategy parameters and test the best combinations on data they have not seen.
Optimization sweeps your strategy's numbers over a range (a grid) and backtests every combination.
Setup
Choose Optimization mode in the backtest form and add up to 3 parameters. Any number in the strategy can be swept: an indicator period, a compared constant, a stop percentage, an ATR multiple… Enter a start, end and step for each.
Ranking objective: Sharpe (default), return, profit factor or Calmar. "Minimum trades" keeps combinations with too few trades out of the ranking.
Invalid combinations (e.g. MACD fast ≥ slow) are not errors; they are skipped and shown as "invalid".
Out-of-sample test
Overfitting means finding parameters that fit the past perfectly but fail in the future. To make it visible, the period is split in two:
- All combinations run and are ranked on the first 70%.
- The best 10 are tested again on the last 30%, which they have never seen.
A combination that shines in the optimization period and collapses in the test period is most likely overfitted. Consistent results in both periods are more trustworthy.
Apply
When you pick a combination and click Apply, its values are saved as a new version of the strategy; the old version does not change.
Limits
- The plan limit applies to compiled combinations × symbols.
- Each optimization uses 1 of your daily backtest allowance.