Trading hours: pick the session a backtest runs on
Every backtest in NinjaTrader runs on a trading-hours template: the schedule that says when a session opens and closes. For CME index futures the default template is the near-24-hour one, so a "day" starts at 6 p.m. the evening before and there is no opening bell inside it. Most strategies do not care. Some care completely: a strategy that trades the opening gap, or the first hour after the open, is looking for a session boundary that the 24-hour template does not contain. On that template it either finds nothing to trade, or it trades a phantom "first hour" at 6 p.m.
AlgoCrucible now lets you choose the template for a run, so the strategy is tested on the session it was written for.
Where the field is
- Run forms (Optimize, Walk-forward, Audit and the rest): a Trading hours box under the timeframe selector.
- Basket form: the same box beside the bar settings.
- Campaign rows: one box per row, so each combination can carry its own session.
Type the exact name of a NinjaTrader trading-hours template — for example
CME US Index Futures RTH for regular hours only. A short list of common names is offered as you
type, but any template NinjaTrader knows will do, including ones you created yourself.
Finding the exact name
Open the Strategy Analyzer, look at the Trading hours dropdown in the settings column, and copy the name as it appears there. The full list, with each template's sessions and holidays, is under Tools → Trading Hours in the NinjaTrader Control Center. Spelling matters: the app sends the name to NinjaTrader as written.
What the three states mean
- Empty — the app leaves the Analyzer alone and the run uses whatever the Analyzer shows right now. This is the default on the run and basket forms, so nothing changes for you unless you type something.
- A template name — the Analyzer is set to that template before the run starts. The report shows the session next to the bar type, so a certificate or a printed report says which schedule the numbers were produced on.
<Use instrument settings>— NinjaTrader's own wording for "the instrument's default template". Type it (or justdefault) to put an Analyzer back after an earlier run set something else.
Campaign rows start out filled with <Use instrument settings> and write it on every row.
That is deliberate: a campaign re-points the same Analyzer window at each combination in turn,
and a row on regular hours must never leak its session into the row that follows. Clear the box
only if you want a row to inherit whatever the Analyzer happens to hold.
When the name is wrong
If NinjaTrader does not know the template, the run stops at the Run button and tells you which name it could not find. It does not fall back to the default and carry on, because a strategy tested on the wrong session produces confident numbers that mean nothing.
The same is true if the bridge running inside NinjaTrader is older than the app you installed: the run refuses and asks you to restart NinjaTrader so it compiles the updated bridge. The status pill at the top of the app says "restart NinjaTrader" while that is the case.
Does it change anything? Two real cases
Whether the template matters depends on how the strategy reads time.
- An opening-gap strategy on MNQ, 1-minute bars, two months of data: 30 trades on the default template, 43 on regular hours. The session boundary is the signal, so the template changes what the strategy sees.
- An initial-balance breakout strategy on the same market: identical results on both templates, to the dollar, across a full walk-forward. It measures its first hour by the clock, trades inside regular hours and is flat before the close, so the overnight bars the 24-hour template adds never touch a trade.
If your strategy reads the session open or close — session start/end inputs, "first bar of the day" logic, gaps — set the template. If it keys off clock times and never holds overnight, the field is unlikely to matter, and a quick one-trial run on each template will tell you.
Related: values left behind in the grid
Choosing a template is the only thing that persists between runs. Every strategy input is set by the app at the start of each run: the values you search, the values you fix, and the strategy's own default for everything else, exactly as the strategy page shows them. Nothing left in the Analyzer's parameter grid by an earlier run, and nothing typed there, reaches a result. If the grid held a different value, the run log says which input was set back and to what. One exception is deliberate: a text value that exists only in the grid, such as a vendor license key, is never wiped silently. The run stops and asks you to give that input a fixed text on the strategy page, with the value to copy.
Next: Setup if the Analyzer is not yet connected, or Results FAQ for other reasons a run reports zero trades.