🎯

Auto-Optimization

Automatic Optimization with Goal Seek

When backtest results aren’t good enough, manually searching for which parameter to change is a lot of work. Goal Seek automates that search and presents several well-performing candidates to compare.

Automating the parameter search

It sweeps through multiple parameters a strategy has — such as moving-average periods or entry conditions — calculating dozens of variations at once. That covers far more ground, far faster, than testing one setting at a time by hand.

Example: It can automatically calculate dozens of variations by sweeping the moving-average period from 5 to 50, then list the combinations with the best balance of win rate and maximum drawdown for you to compare.

Compare and choose

Results are presented as a list, so you can pick a candidate that matches your own priorities — whichever has the highest win rate, or the smallest drawdown (risk).

Important note

Goal Seek is also an optimization based on historical data and carries the same overfitting risk. A candidate found this way is not a guarantee of future performance.

How the search works

Starting from your current settings, it nudges one parameter at a time up or down, re-runs the backtest, and keeps moving in the direction that increases net profit. It repeats this up to two rounds until there is no further improvement, testing at most 160 combinations. Because it is not a brute-force search of every combination, results come back in a few seconds to a little over ten seconds.

The symbol, timeframe and period stay as they are. It adjusts strategy parameters such as moving-average lengths, plus the take-profit and stop-loss widths (for the EMA perfect order strategy, whose stops come from price structure, it adjusts the risk-reward ratio instead).

Reading the results

The five candidates with the highest net profit are listed. Selecting a candidate applies it to the backtest settings, so you can run it and check the equity curve, drawdown and other details.

Avoiding overfitting

  • Treat candidates with extreme parameter values with caution.
  • Test the setting on other periods (for example, the first and second halves) and other symbols, and check that results do not collapse.
  • If a small change in parameters makes results drop sharply, the setting probably just happened to fit the past.
  • Candidates with few trades are heavily affected by chance; use them only as a reference.

FAQ

Is the result the optimal setting?

No. It is an approximate search that tries a limited set of candidates in turn, so better combinations may exist. And because it is fitted to past data, there is no guarantee it will work the same way in the future.

Does it work with free-form rules?

If the rule contains numbers such as periods or thresholds, those numbers are adjusted. Rules with no adjustable numbers cannot be optimized.

↗View Dashboard