Search modes, objectives & filters
How grid, random and coarse-to-fine search work in PineTune, which objectives are available, and how filters decide the best result.
Search modes
| Mode | What it does | Use it when |
|---|---|---|
| Grid | Runs the full Cartesian product of all candidate values. If it exceeds Max runs, only the first N are run. | Few inputs, a few hundred combinations. |
| Random | Samples Max runs combinations at random from the full grid. | Many inputs, the grid explodes. |
| Coarse-to-fine | Spends about half the budget on a coarse sweep at your step size, takes the Top-N passing results, then searches their ±1-step neighbourhood at step / subdivision. |
You want to converge quickly on a good region. |
Coarse-to-fine shows two extra fields: Refine Top-N and Subdivision.
Objectives
| Objective | Direction |
|---|---|
| Net profit | higher is better |
| Net profit % | higher is better |
| Profit factor | higher is better |
| Win rate % | higher is better |
| Average trade | higher is better |
| Sharpe ratio | higher is better |
| Sortino ratio | higher is better |
| Total trades | higher is better |
| Max drawdown | lower is better |
| Max drawdown % | lower is better |
“Lower is better” objectives are negated internally, so ranking is always “highest score wins”.
Filters
Filters reject combinations that don’t meet your minimum standard. Rejected combinations are still recorded, with the reason in the Note column, but never compete for Best.
- Min trades: e.g.
20: fewer than 20 trades fails. - Max drawdown %: e.g.
20: drawdown above 20 % fails. - Min profit factor: e.g.
1.5. - Min win rate %: e.g.
40.
Set any filter to 0 to disable it.
A sensible starting recipe
- Objective: Net profit % or Sharpe ratio.
- Filters: max DD 20 %, min PF 1.3, min trades 30.
- Mode: Coarse-to-fine with 300-500 runs.
- Re-check the winner on other symbols with multi-symbol runs before trusting it.
Avoiding overfitting
The single best backtest is often the most overfit one. Prefer settings whose neighbours also score well, require a meaningful number of trades, and confirm on symbols or periods the optimizer never saw. Backtests are hypothetical and do not guarantee future results.