Black Friday, until December 2: FONDEOREAL gives 30% off the 50K, 20% off the 100K and 10% off the 150K at FTMO Futures. See the offer →

Lab · November 2026 · 4 min read

NinjaTrader 8 Strategy Disabled Itself? 3 Causes

Order rejections, connection loss and restart limits: why NinjaTrader 8 stops your strategy and which settings control it, based on the official guide.

It is usually a safeguard, not a bug. With default settings, NinjaTrader 8 stops a strategy when the broker rejects an order, when the connection drops for over 10 seconds in certain cases, or when it drops too many times in a row. Before changing anything, find out which of the three it was.

On this page
  1. 1. The broker rejected an order
  2. 2. The connection dropped
  3. 3. The connection is unstable
  4. What to do on a rejection
  5. What to do on a disconnect
  6. What to do when it happens
  7. Sources

1. The broker rejected an order

This is the default behavior, RealtimeErrorHandling.StopCancelClose. When an order comes back rejected, the strategy stops, cancels its working orders and sends one close order for each position it manages. That's why it can look as if it disabled itself and took you out of the market too.

What to check: Find the order in the Rejected state and read the reason before enabling the strategy again.

2. The connection dropped

With ConnectionLossHandling at its default, Recalculate, the strategy stops in three cases: if the data feed is down for longer than DisconnectDelaySeconds, 10 seconds by default; if data and order feeds are both down for that long; or if the order feed is down and the strategy places an order action meanwhile. If the connection returns sooner, it carries on as normal.

What to check: Check what time it disconnected and how long the outage lasted.

3. The connection is unstable

NinjaTrader limits restart attempts. By default, NumberRestartAttempts is 4 and RestartsWithinMinutes is 5: go over 4 attempts in 5 minutes and the strategy stops and gives up. The guide says this exists to stop it when the connection can't stay stable.

What to check: If you see several outages in a row, fix the connection before touching these values.

What to do on a rejection

ValueWhat it does
StopCancelCloseDefault. Stops the strategy, cancels orders and closes its positions.
StopCancelCloseIgnoreRejectsDoes the same on any error except order rejections.
IgnoreAllErrorsIgnores order errors and keeps running.

Be careful with IgnoreAllErrors. The guide warns it can have serious adverse effects unless you've programmed your own rejection handling in OnOrderUpdate(), and says that's only for experienced programmers. The dangerous case is simple: if your stop is rejected and nothing handles it, the position stays open with no protection. These properties should only be set in State.SetDefaults or State.Configure.

What to do on a disconnect

ValueWhat it does
RecalculateDefault. If the strategy was stopped, it tries to recalculate its position when the connection returns.
KeepRunningKeeps running and resumes as if no disconnect occurred.
StopStrategyStops it after DisconnectDelaySeconds and takes no action when the connection returns.

What to do when it happens

  1. Don't enable it again right away.
  2. Check your real position and active orders on the account.
  3. Look in the log for the exact time and whether there was a rejection or a disconnect.
  4. Fix the cause and pick the right Start Behavior when you enable it.
  5. If the PC or a restart was the problem, read why bots stop at night.

On a prop firm account, stopping usually beats running blind. A position with no stop can use up your drawdown in minutes. If you change these settings, test them first in simulation, with deliberate disconnects.

Want someone to review it? We check how your NinjaScript strategy reacts to rejections and disconnects.

Review from $90 Analyze NinjaTrader with AI

Sources

Keep reading

Practise an evaluation, freeAll 91 articles →

Free: The Other Half Workbook. Nine templates for trading with a cool head: your one-page plan, the pre-session checklist, the twelve-patterns test, your size and the bill for your mistakes.

Get the free workbook

Get ready for 2027: the Trader Planner. Each day's US releases in New York time, your pre-market routine and a log for every session.

Paperback on Amazon, $16.99 Get the PDF, $9

Educational content based on the official NinjaTrader documentation. Not investment advice. Test any change on a simulation account before using it live.