How the engine works
Exit settings
The Exits tab sets "the ranges the optimizer samples exit genes within — you set the range, not the value." Every candidate gets its own exit parameters drawn from these ranges; Pin a range to fix that gene across every candidate (an optimized gene becomes a fixed setting).
Target and time stop
- R-multiple target — the profit target as a multiple of the initial stop distance (reward:risk). Enable it and set Min/Max (default range 0.5–6, step 0.25). Check Pin — fix every candidate to the Min value to lock a single target.
- Max bars in trade — a time stop: force-exit after this many bars in the trade. Default range 5–480 bars, pinnable the same way.
Allowed exit genes
Three checkboxes control which exit mechanisms the optimizer may use. Unchecking one forbids it on every candidate:
- Trailing stop — let the optimizer use a trailing stop.
- Breakeven move — let it move the stop to breakeven after a trigger.
- Partial scale-outs — let it scale out of part of the position.
Force trailing stop on every candidate goes the other way: every strategy must carry a trailing stop (seeded to the default ATR trail; the optimizer still tunes the trail distance). It overrides the Trailing stop toggle above.
Reversal exits
Search exit-signal trees lets the optimizer evolve a reversal exit — an indicator condition the strategy checks while in a position, flattening when it fires (e.g. a long exits when momentum turns down) instead of only waiting for the stop or target. Off by default; turning it on widens the search space.
When enabled:
- Exit search complexity — the Min/Max tree depth the optimizer explores for exit conditions. Depth 1 is a single indicator condition; deeper trees combine more conditions with AND/OR. Blank uses the optimizer's global depth.
- Reverse into the opposite side (experimental) — when the exit signal fires, flip straight into the opposite direction instead of just flattening, but only when the opposite entry signal has flipped hard enough:
- Reverse aggressiveness (flip strength 0–1) — the fraction of the opposite entry's conditions that must hold to reverse instead of flatten. Lower reverses more readily; higher only on a strong flip. Blank = 0.5.
- Note: reversal is backtest/optimize only for now — the standalone NinjaTrader export flattens instead and warns about it on download.
Practical guidance
- The default ranges are deliberately wide. If validated strategies keep landing at a range edge (say, every survivor uses the max R target), widen that side — the optimizer is telling you the optimum lies beyond the fence.
- Pinning is how you turn a discovered value into a design decision: run wide once, see where survivors cluster, pin to that neighborhood, and re-run for refinement.