Automated strategy · NinjaTrader 8 · 6 min read
CBDR Compass
Uses the evening CBDR range as a ruler: when price reaches a chosen SD level it either fades the move back toward the box or follows the break to the next level out.
- NinjaTrader 8 name
- ToredaCbdrSdStrategy
- Built on
- CBDR Range + SD
- Modes
- Fade · Continuation
What it does
CBDR Compass trades off the CBDR Range + SD indicator. Once the evening CBDR window closes — 16:00–20:00 New York time by default — the indicator projects standard-deviation levels from that range, and CBDR Compass acts when price reaches the level you choose.
| Mode | The idea | Target |
|---|---|---|
| Fade | Treats a stretch out to the level as overdone and trades back toward the CBDR box. | Back at the CBDR range. Stop from the Risk settings. |
| Continuation | Treats a break through the level as momentum and trades with it. | The next SD level out (or the Risk target at the outermost level). Stop from the Risk settings. |
Once per side per day
Each level is traded at most once per side per day, resetting when the next CBDR window opens.
Inputs
| Input | Default | Meaning |
|---|---|---|
| Mode | Fade | Fade / Continuation — see the table above. |
| Trigger Level | 2 | Which SD level (1–4) arms the trade. |
| Direction | Both | Long / Short / Both. A level skipped by Direction still counts as used for the day. |
| Start Hour / Minute | 16:00 | CBDR window open. |
| End Hour / Minute | 20:00 | CBDR window close. The window must not span midnight. |
The CBDR window is always New York time
The indicator is pinned to America/New_York regardless of the Session Tz input, which only governs the trading window and the flatten clock. Enter Start and End in New York time.
The default flatten blocks the evening reaction
The 15:55 flatten is on by default and blocks entries until midnight. The window closes at 20:00, so with the defaults nothing trades in the evening — and a level reached while entries are blocked still counts as used for that day. To trade the evening reaction, turn Use Flatten Time off (or move it past the window) and mind NT8's exit-on-session-close.
Shared inputs
Brackets, session guards, confluence filters and one-position-at-a-time handling come from the base every Sun Engine strategy is built on. These are the inputs that matter most.
| Risk input | Default | Meaning |
|---|---|---|
| Contracts | 1 | Order quantity for every entry. |
| Stop Unit / Stop Ticks | Ticks / 40 | Protective stop distance. Switch Stop Unit to ATR to use Stop ATR Mult (1.5) × ATR(14) instead. |
| Target Unit / Target Ticks | Ticks / 80 | Profit target distance. ATR mode uses Target ATR Mult (3.0). |
| Use Breakeven | Off | Moves the stop to entry once the trade is Breakeven Trigger Ticks (40) in profit. |
| Use Trail | Off | Tick trail at Trail Ticks (40). Breakeven and trail only ever tighten the stop, never loosen it. |
| Session input | Default | Meaning |
|---|---|---|
| Use Time Window | Off | When on, entries are allowed only between Window Start (09:30) and Window End (15:30). |
| Use Flatten Time | On | Flattens any open position and stops trading at 15:55. |
| Max Trades Per Day | 0 | 0 = unlimited. |
| (built in) | — | NT8's own exit-on-session-close is also enabled, 30 seconds before the close, as a backstop. |
All session times are in Session Tz, America/New_York by default. Filters are all off out of the box; when one is on, an entry is skipped unless every enabled filter passes.
| Filter | Rule |
|---|---|
| Quarter | Allow-list of AM/PM Q1–Q4 on the 06:00–18:00 session grid. Anything outside that grid is blocked even with all eight flags on, by design. |
| Sunrise | Price must be within Sunrise Zone Tolerance Ticks (0) of a live sunrise zone from Sunrise Cities (NYC, LON, TYO, DXB, AKL) no older than Sunrise Max Age Days (12). Any of the 18 cities can be listed, whatever the indicator's chart defaults are. |
| SMT | Requires a same-direction SMT divergence within SMT Lookback Bars (20) against SMT Symbol A, and optionally SMT Symbol B. |
SMT filter: set Symbol A to a real contract
The ES ##-## default is only a placeholder. Enter the actual contract you want to compare against, e.g. ES 12-26, or the filter has no reference series to work with.
How to run it
- Chart. Open your instrument on a 1–5 minute chart. The CBDR high and low are built from the chart's own bars, so a fast chart gives the truest range. Calculate is On Bar Close; leave it.
- Attach. Right-click the chart → Strategies… → add ToredaCbdrSdStrategy, set the inputs, and tick Enabled. Bars Required To Trade is 30, so nothing fires until 30 bars have loaded.
- Backtest. Control Center → Strategy Analyzer → pick the strategy, instrument and period. Optimizations run quickly; Mode, Trigger Level, Stop Ticks and Target Ticks are the natural knobs.
- Visual check. The strategy draws nothing. Add the ToredaCBDR indicator to the same chart with matching window times and an SD Count of at least the Trigger Level (+1 for Continuation) to see the box, the projected levels and — with Show SD Labels — the level chips.
Don't trade the defaults
The defaults are a starting point, not a tested configuration — in the backtests they lost money on most instrument and timeframe combinations. Start from the settings on the instrument pages below, and in simulation.
Behavior to expect
- One trade at a time. A signal that arrives while in a position, or while an entry is waiting to fill, is ignored rather than queued.
- Entries are market orders on bar close; the stop and target are attached the instant the entry fills.
- Order signal names are
CbdrFadeUp/CbdrFadeDn(Fade) andCbdrContUp/CbdrContDn(Continuation), with stop/target suffixes added by the base. - Nothing trades during the window itself; signals begin on the first bar after it closes.
- An entry that never fills is released after a timeout, with a message in the Output window. Flattening a position by hand also clears the strategy's state so it can trade again.
- Watch the NinjaScript Output window (Control Center → New → NinjaScript Output): every declined or timed-out entry and every filter problem is printed there.
Results by instrument
CBDR Compass was backtested on six micro futures, August 2024 to September 2026, and every recommended setting was confirmed in NinjaTrader's own Strategy Analyzer with commission. Pick an instrument for its results, the exact settings, and whether we'd use it there.
MNQ
Micro Nasdaq-100
- Net
- +$5,377
- PF
- 1.32
- Max DD
- $822
In the combined account
MYM
Micro Dow
- Net
- +$1,292
- PF
- 2.01
- Max DD
- $170
MGC
Micro Gold
- Net
- +$3,653
- PF
- 1.32
- Max DD
- $675
MES
Micro E-mini S&P 500
- Net
- +$2,747
- PF
- 1.33
- Max DD
- $634
MCL
Micro Crude Oil
- Net
- +$932
- PF
- 1.34
- Max DD
- $306
In the combined account
SIL
Micro Silver
- Net
- +$11,585
- PF
- 1.56
- Max DD
- $1,490
Backtest results are hypothetical. They were produced with the benefit of hindsight on historical data, do not represent actual trading, and cannot fully account for slippage, liquidity or the emotional pressure of live trading. Past performance is not indicative of future results. This content is for educational purposes only and is not financial advice. Trading futures involves substantial risk of loss. See our risk disclosure for details.