Optimization tests many values of your system’s numeric settings in one run of NinjaTrader’s Strategy Analyzer: indicator periods, BloodHound solver values, order and trailing distances, money management limits. It shows which values did best on the data you tested.
New to it? Read NinjaTrader’s Strategy Analyzer and Optimize a strategy guides first.
Best on past data isn’t a forecast
Settings tuned to fit past data closely often do worse live (overfitting). Prefer ranges of values that all do reasonably well, test the results on data the optimization didn’t use, and allow for slippage and commissions.
Computer requirements
Optimizing is demanding, especially on memory (RAM).
| Suggested | |
|---|---|
| RAM | 12 GB minimum (our testing used 12 GB on 1 minute charts). 16 GB for years of data, and more for Renko and very short timeframes. With 8 GB, keep optimizations small: fewer days of data, only a few settings, and about 20,000 iterations or fewer. |
| CPU | An 8-core CPU. A typical VPS with 1 or 2 cores takes much longer. |
Also:
- Set Setup » Maximum bars look back to 256.
- Watch Windows memory use in Task Manager. Repeated optimizations eventually use it all; restart NinjaTrader before the next one.
- Run only a couple of optimizations per Strategy Analyzer window, then close it and open a new one. Otherwise resources and caches build up until optimizations fail.
Optimization Settings

The Optimization Settings button in the BlackBird Settings window chooses which settings the Strategy Analyzer can optimize. For example: an indicator’s period; a BloodHound solver value, such as a moving average’s minimum slope or whether CCI must pass ±100 or ±150; money management limits; or trailing rule values, such as moving the stop-loss to breakeven at 10 or 15 ticks.
Configure Optimizable Settings window

Click a section header (1 to 4) to expand it, then double-click a setting (or select it and click Add) to add it to the selected list (5). Those settings appear under Optimizer Parameters in the Strategy Analyzer’s settings grid.
| What it lists | |
|---|---|
| 1 | BloodHound indicators and solvers with optimizable values. |
| 2 | Order settings and trailing rules. |
| 3 | Money Management values. |
| 4 | Risk Management values. |
| 5 | The settings selected for optimization. Name is what the Strategy Analyzer shows; click it to rename. Path shows exactly where the setting is, to tell similar names apart. Select one and click Remove to remove it. |
Up to 16 settings at once
At most 8 whole-number settings (such as indicator periods: SMA(14), never SMA(100.5)) and 8 decimal settings (such as a percentage, or Bollinger’s number of standard deviations, 2.5). To test more, remove some, add others and run again.
Can’t be optimized: the number of contracts, and Money Management » Account Risk » Risk Per Trade.
Finding a setting in the window
How names in the window match settings in BloodHound and BlackBird. Money Management and Risk Management settings match their menus directly; check the Money Management descriptions to pick the right ones.
BloodHound solvers
Threshold solver


Slope solver


Comparison solver

BlackBird orders
Entry, profit target and stop-loss orders

Order setup elements. When a setting’s long and short values are equal (here, Price Lookback Period), the window shows one combined setting; when they differ, it shows one for long and one for short.

Stop-loss values are negative
When optimizing a stop-loss distance, use negative numbers in the Strategy Analyzer’s Optimizer Parameters, as in the stop-loss menu.


Known issues
| Issue | What to do |
|---|---|
| Genetic optimizer | Use the Default optimizer for now; the Genetic optimizer may throw an error. |
| Optimize Data Series | Leave this Strategy Analyzer option off for now; it causes errors. |
| Iteration count too high | After removing and adding settings in the same Strategy Analyzer window, the iteration count (and the green progress bar) can show more iterations than there are, because NinjaTrader caches the old count. The run still stops at the right number. A new Strategy Analyzer window resets it. |
Where these options are

