Lab · October 2026

Why your NinjaTrader bots stop overnight (and how to prevent it)

Windows Update, few-second disconnections, forced closes and restarts: what left our bots stopped (and duplicated), and how we fixed it.

If you leave NinjaTrader strategies running overnight, the strange thing is not that they stop: it's that they don't. In our lab, four different things left them idle without warning, and one duplicated them.

The four culprits we saw

1. Windows Update restarts even with "active hours"

We had active hours set to cover the night. Even so, Windows installed an update and restarted the PC at 3:29 AM. NinjaTrader stayed closed until someone opened it in the morning. Had there been an open position at that moment, it would have been left unmanaged.

2. A 13-second disconnection

A data feed disconnection of just 13 seconds stopped all our test strategies. The worst came after: in the next session, NinjaTrader re-enabled the original strategies when our watchdog had already recreated them, and they ended up duplicated. Two copies of the same strategy trading the same account is the fastest way to double your risk without noticing.

3. Flattening all positions disables the strategies

Many prop firm traders use a forced close at a set time so they don't hold positions overnight. When that close flattens an account, NinjaTrader disables the strategies on that account. The next day they don't start on their own.

4. Restarting NinjaTrader doesn't re-enable them

After closing and reopening NinjaTrader, the strategies that were running show up disabled until someone enables them again. If the restart happened at three in the morning, nobody does it until you wake up.

How we solved it

Checklist before leaving bots running overnight

  1. Can the PC restart? If so, does NinjaTrader start and connect on its own? Test it by restarting it yourself one afternoon.
  2. What does each strategy do if the connection drops? Check its properties in NinjaTrader and decide whether it should keep going, recalculate or stop.
  3. How will you find out something has stopped? Without an alert (to your phone or by email), you'll find out late.
  4. Can a strategy end up duplicated? Check after every restart and every disconnection.
  5. Does your prop firm allow bots and overnight positions? APEX prohibits automation, and both APEX and Lucid require you to be flat at the end of each session (check their current rules in the rules table).
  6. Do you have a plan if everything fails with an open position? A stop order sitting on the broker's server protects you even if the PC shuts down (check it's not a locally simulated stop); a bot's "mental" stop doesn't.
Using AI with NinjaTrader? NT8-MCP lets Claude or another assistant read your accounts, history and strategies with no way to send an order. And to see how your strategy would do in a funded account, use the free simulator.

Educational content based on our own experience. Not investment advice. Firm rules change: check them on each firm's website. This article contains no affiliate links.