Wake up the strategy thread

Within the settings of your application, there is a setting to automatically close all positions at a certain time. That’ll be your best bet.

Link: https://support.ninjatrader.com/s/article/Auto-Close-Position-NinjaTrader-Desktop?language=en_US

Yes I have that setting as the last resort…though if VPS or ninjatrader crashes even that last resort is not there, but then I avoid ending up there because my strategy will not be notified of its positions going flat.