Skip to content
Holdout

NinjaTrader 8

Build on Holdout from your own code

Every major Holdout indicator exposes its signals and levels to NinjaScript, so your own strategies and indicators can use them as conditions, filters and stops.

Call it like any indicator

HoldoutOrb(...), HoldoutMarketStructure(...) and the rest work like NinjaTrader's own indicators: create one in State.DataLoaded and read its values by bar, e.g. ms.Bias[0].

Open example strategy

A complete, commented strategy you can copy and change: ORB signals on trend days, trailed with Core Trend on 15-minute bars, with optional MTF Panel and Market Structure filters.

Same license, no reverse engineering

The indicators stay compiled. Your scripts read their values through public properties, and the license check works as usual.

How the example tested. Replaying exactly its rules on NQ from April 2014 to September 2026 (one micro contract, $2.50 commission and one tick of slippage per trade): 752 trades, profit factor 1.56, a largest drawdown of about $1,200, and every year positive except 2016. On ES the profit factor was 1.46. An earlier version trailed Core Trend on the chart's own bars, which lost money on 1-minute charts in 2026 (the trail was too tight), so the trail now runs on a 15-minute series whatever the chart. The MTF and structure filters didn't improve on the trend-day check in our tests, so they're off by default. Past results don't predict future ones: run it in Markers mode and on a Sim account first.

Quick start

A filter in ten lines

Settings are passed in the order NinjaTrader's IntelliSense shows; these are the defaults.

// in your strategy
private HoldoutMarketStructure ms;
private HoldoutCoreTrend ct;

protected override void OnStateChange()
{
    if (State == State.DataLoaded)
    {
        ms = HoldoutMarketStructure(3, true, true, true, true, 11, 300);
        ct = HoldoutCoreTrend(3, 10, 2.0, 2.0, 15, 5, true, true, false);
    }
}

protected override void OnBarUpdate()
{
    // long only while structure is bullish and Core Trend is up
    if (ms.Bias[0] > 0 && ct.Direction[0] > 0 && ct.Direction[1] < 0)
        EnterLong("CT flip with structure");
    if (Position.MarketPosition == MarketPosition.Long)
        SetStopLoss(CalculationMode.Price, ct.TrailStop[0]);
}

One NinjaTrader rule to know: if an indicator loads extra data (another timeframe, tick data, ^VIX), the strategy that uses it must load the same series first, with AddDataSeries() in State.Configure. The table below lists them. Read your own decisions on the chart's bars (if (BarsInProgress != 0) return;).

Values are written once per bar and never change afterwards, except the forming bar's [0] where noted. Signals appear on the bar where they were decided, so a backtest that reads them can't see the future.

Reference

What each indicator exposes

Signal
+1 / −1 on the bar a breakout was taken (after the CVD, TICK and day checks), else 0
SkippedSignal
+1 / −1 on the bar a break was skipped by a check, else 0
TradePosition
The indicator's own trade: +1 long, −1 short, 0 flat
RangeHigh, RangeLow
Today's opening range once complete (NaN before)
TradeStop, TradeTarget
The open trade's current stop (moves to entry at breakeven) and target

Series to add in your strategy: 1 Minute (CVD check on) · 1 Tick (CVD source Auto; use BarProxy to avoid it) · ^TICK 1 Minute (TICK check on) · ^VIX Day (VIX gate on)

A decision that waits for its CVD or TICK minute shows on the bar where it was decided, the first bar you could act on it.

HoldoutNoiseArea(…)

Noise-Area Momentum →
Signal, SkippedSignal
+1 / −1 on the bar a signal was taken or skipped by the filters
TradePosition
+1 long, −1 short, 0 flat after this bar
Upper, Lower, Vwap
The noise band and session VWAP (also plotted)

Series to add in your strategy: ^VIX Day (VIX gate on only)

Needs a 1-minute chart with 14 complete prior sessions loaded. The band and VWAP are only set during the regular session (09:30–16:00 New York time); check IsValidDataPoint before reading them outside it.

HoldoutMarketStructure(…)

Market Structure →
Bias
+1 bullish, −1 bearish after the last break, 0 before the first
BreakSignal
+1 bullish BOS, +2 bullish CHoCH, −1 / −2 bearish, on the breaking bar
LastSwingHigh, LastSwingLow
Prices of the latest confirmed swings

Series to add in your strategy: None

HoldoutCoreTrend(…)

Core Trend →
Direction
+1 uptrend, −1 downtrend; a change from the previous bar is a flip
TrendLine
The smoothed line drawn on the chart
TrailStop
The unsmoothed ATR trailing stop a close must cross to flip

Series to add in your strategy: None

HoldoutMtfPanel(…)

Multi-Timeframe Panel →
Score
Sum of the five timeframe trends, from +5 (all up) to −5
Trend5m, Trend15m, Trend1h, Trend4h, TrendDaily
+1 / −1 per timeframe, 0 until loaded
StructureState
Current bar only: 2 uptrend, −2 downtrend, 1 expansion, −1 compression

Series to add in your strategy: 5, 15, 60 and 240 Minute · 1 Day

HoldoutOrderFlow(…)

Order Flow & CVD →
BarDelta, Cvd
Delta of each bar and cumulative delta since the reset; [0] is the bar so far, [1] and older are final
IsTrueDelta
1 when the bar's delta comes from tick data, 0 for the 1-minute estimate
AggSignal, AbsSignal
AGG / ABS marker of the bar that just completed: +1 / −1, set on the bar it became known
DivergenceSignal
+1 bullish / −1 bearish CVD divergence, on the bar it was confirmed

Series to add in your strategy: 1 Minute (charts above 1 minute, 1-minute estimate on) · 1 Tick (true-delta history on)

HoldoutCvd(…)

Order Flow & CVD →
CvdSeries
Cumulative delta per bar (also the plot ‘CVD’)

Series to add in your strategy: Same as Holdout Order Flow

HoldoutSessionLevels(…)

Session Levels →
PriorDayHigh, PriorDayLow, PriorDayClose
Prior regular-session levels
OvernightHigh/Low, AsiaHigh/Low, LondonHigh/Low, PremarketHigh/Low
Session ranges; a window that is still open holds its range so far
InitialBalanceHigh/Low, DayOpen
First hour range and the 09:30 open
PriorWeekHigh, PriorWeekLow
Last week's high and low

Series to add in your strategy: 1 Minute (charts other than 1 minute)

HoldoutVolumeProfile(…)

Volume Profile →
Poc, ValueAreaHigh, ValueAreaLow
The current session's point of control and 70% value area at each bar
LvnAbove, LvnBelow
Middle of the nearest low-volume node above / at or below the bar's close (NaN = none so far)
PriorPoc, PriorValueAreaHigh, PriorValueAreaLow
The last completed session's POC and value area (regular session by default)
NakedPocAbove, NakedPocBelow
Nearest earlier-session POC that no later bar has traded through, above / at or below the close (NaN = none)

Series to add in your strategy: 1 Minute (charts above 1 minute, build-from-1-minute on)

HoldoutVwapBands(…)

VWAP & Bands →
Values[0…]
Its plots: VWAP and the bands

Series to add in your strategy: Day / Week (daily or weekly EMA lines on)

HoldoutSupplyDemand(…)

Supply, Demand & Liquidity →
NearestDemandTop/Bottom, NearestSupplyBottom/Top
The closest zones below and above price
InZone
+1 inside demand, −1 inside supply, ±2 for a ★ round-number zone, 0 neither

Series to add in your strategy: 60 Minute (1h swings on) · 240 Minute (4h swings on)

Current bar only: zones are rebuilt on the latest bar to keep charts fast, so these can't be read in a backtest.

NinjaTrader's Strategy Builder lists plotted values only (VWAP Bands, the noise band and CVD). The signal values above are for NinjaScript code. Big Trades and HTF Candles values are coming next.

Automated trading carries its own risks: test on a Sim account first and read the risk disclosure. Get Holdout Pro