Every run in a sweep is a normal, deterministic backtest — same real prices,
same modeled costs. Optimization just runs many of them and compares the
numbers. The AI doesn’t decide what’s “best”; the simulator does the math and
the metric does the ranking.
How a sweep works
1
Pick the parameters to sweep
Any tunable number on the strategy card — an EMA period, a stop size, a target,
an ATR multiple. Hold the rest fixed.
2
Set a range for each one
Give a min, a max, and either a step or a number of test points.
For example, sweep the stop from 600 in $100 steps (5 values), or the
fast EMA from 5 to 15.
3
Choose the metric to optimize
Best average P&L per trade, best total P&L, best win rate — whatever defines
“better” for your idea.
4
Run it
AskFutures backtests every combination in the grid and reports the winning
parameter set, with the full table available to download.
Two-tier sweeps: why some changes are fast and some are slow
Under the hood, a sweep is organized in two tiers — an outer loop and an inner loop — and which tier a parameter lands in is why some sweeps fly and others take a while.Inner = fast
Parameters that only affect how trades are managed — stop size, target,
trailing stop, max time in trade. The indicators don’t change, so the engine
reuses them and just re-simulates the exits. Many values, cheaply.
Outer = slower
Parameters that change an indicator itself — an EMA period, an RSI length,
an ATR window. Every value forces the indicators to be recomputed across the
whole window before the trades can run. Fewer values, more work each.
When to optimize
Optimize after a strategy already backtests cleanly and shows a plausible edge — to refine it, not to rescue it.Good time to optimize
Good time to optimize
The strategy passes its backtest, takes a sensible number of trades, and the
average P&L per trade is around break-even or better. Now you’re asking “is
there a better stop, or a slightly different EMA pair?” — a refinement.
Not yet
Not yet
The strategy fails to run, takes a handful of trades, or loses badly across the
board. No range of stop sizes fixes a broken idea — fix the logic in chat
first, then sweep.