Lab · October 2026

Why your NinjaTrader 8 strategy isn't placing orders: 11 causes and how to check them

It's waiting to go flat, it's short of bars, it calculates on bar close or an internal rule ignores it. The usual causes, from the official NinjaScript docs, and how to spot them in a few minutes.

It's usually one of three things: the strategy is waiting to go flat before trading in real time, it hasn't loaded the bars it needs yet, or NinjaTrader is ignoring the order because of one of its internal rules. You can spot all three in a few minutes with the Strategies tab and the Output window.

It's one of the most frequently asked questions on the official NinjaTrader forum. Here are the causes in the order you should check them, with what the official NinjaScript documentation says. It applies to hand-written and Strategy Builder strategies that use the managed approach (Enter, Exit and Set methods).

1. It's waiting to go flat

When you enable it, the strategy first runs through historical data and may end up “inside” a virtual position. With the default StartBehavior, WaitUntilFlat, it sends nothing to your account until that virtual position closes or reverses. That can take hours. You'll see it in the Control Center's Strategies tab: the strategy name is highlighted orange or yellow.

To start from flat, skip trading on historical data (see point 4). Switching StartBehavior to ImmediatelySubmit also starts right away, but it assumes your account already holds the same position as the strategy; if it doesn't, they end up out of sync.

2. It doesn't have the bars it needs yet

BarsRequiredToTrade defaults to 20: until the primary series has 20 bars, the strategy doesn't process orders. With several series, that number only guards the primary one; check each with CurrentBars.

3. It only calculates on bar close

Calculate defaults to OnBarClose: OnBarUpdate() runs once when each bar closes. On a 15-minute chart it looks idle for 15 minutes. To react inside the bar, use OnEachTick or OnPriceChange, and review your logic, because [0] then refers to the bar still forming. Note: on historical data it still calculates on bar close unless you use Tick Replay, so backtests and live trading don't behave the same.

4. It trades historical data, but not in real time

The strategy goes through the Historical, Transition and Realtime states. Historical orders are simulated. If your condition only triggers on old bars, you'll never see a real-time order. If you only want to trade live, return from OnBarUpdate() when State == State.Historical: that way it also starts flat.

5. It already has an entry in that direction

EntriesPerDirection defaults to 1. With a long position open, a second long entry is ignored. If you need more, raise the number or use EntryHandling.UniqueEntries with distinct signal names.

6. An internal rule ignores it

The managed approach has rules to prevent unwanted positions. Per the documentation, they don't apply to market orders, only to limit and stop orders. For example, it ignores:

The Log tab only reports the first order that breaks a rule; TraceOrders shows you all of them.

7. The broker rejected it… and the strategy stopped

A buy stop below the price or a sell stop above it usually gets rejected. The key part: with the default RealtimeErrorHandling, StopCancelClose, a single rejection stops the strategy, cancels its orders and closes its position. If it “stopped working” after an order, check the Log tab.

8. The next trade inherits the old stop

SetStopLoss() has to be called before the entry. If you change it inside OnBarUpdate() (to move it to break-even, for example), the documentation says to reset it when the strategy is flat; otherwise the next trade starts with the last value. With CalculationMode.Price, that old price can end up on the wrong side and the order gets rejected (point 7).

9. Your limit orders disappear on their own

In the managed approach, orders from Enter and Exit methods are cancelled at the end of the bar if they aren't resubmitted. If you want a limit order to stay alive, send it again on every bar while your condition holds.

10. It closed before the end of the session

IsExitOnSessionCloseStrategy is on by default: a few seconds before the session closes (ExitOnSessionCloseSeconds), the strategy cancels its orders and closes its position. If your session template doesn't match the hours you trade, it looks like it closes on its own.

11. Wrong account, connection or contract

The strategy trades the account you picked in its properties (the Account Display Name column of the Strategies tab), not the Chart Trader's. Also check that the connection is up and that you're on the current front-month contract: after the rollover, volume moves to the next expiry and the old contract barely moves; once it expires, it doesn't move at all.

How to see it in a few minutes

If the strategy name is highlighted orange or yellow in the Control Center's Strategies tab, it's waiting to go flat. For the rest, turn on TraceOrders and put a Print() at the start of OnBarUpdate(). The Output window (Control Center → New → NinjaScript Output) will tell you which state the strategy is in on each bar and why each order is ignored. The Log tab shows rejections.

// Add these lines to your methods; don't duplicate OnStateChange() or OnBarUpdate().
protected override void OnStateChange()
{
    if (State == State.SetDefaults)
    {
        TraceOrders = true;   // the Output window explains why each order is ignored (rejections show in the Log tab)
    }
}

protected override void OnBarUpdate()
{
    // the STRATEGY's state, bar and position (not your account's); it prints a lot on historical data
    Print(Time[0] + " " + State + " bar " + CurrentBar + " " + Position.MarketPosition);
    if (CurrentBar < BarsRequiredToTrade)
        return;
    // ... your entry logic ...
}

If it's a prop firm account: before you leave an automated strategy running, check that your firm allows it. APEX, for example, bans automation in its rules. You'll find it firm by firm in news and bots by prop firm.

Would you rather have someone look at it? We review NinjaScript strategies and fix the bugs we find, and convert Pine Script indicators and strategies to NinjaTrader 8: NinjaScript services.

Sources

Official NinjaScript documentation (above) and the NinjaTrader 8 guide: “Syncing Account Positions” and “Strategies Tab”. Documentation checked on October 21, 2026. NinjaTrader may change defaults between versions: check the one you have installed.

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

Educational content based on the official NinjaScript documentation. Not investment advice. Firm rules change: check them on each firm's website. This article contains no affiliate links.