Quick answer
Time in Force (TIF) specifies an order's lifespan. DAY expires at the current trading session's end; GTC continues until cancellation; GTD uses a chosen expiry date. The connection matters: NinjaTrader documents Rithmic and FXCM GTD expiry as locally simulated, requiring NinjaTrader to remain connected.
What DAY, GTC and GTD mean
A session boundary is not necessarily midnight on your computer. Confirm the applicable session and broker rules for the instrument. TIF limits the lifetime of an unfilled order; it does not specify when a filled position must close.
| Setting | Expiry rule |
|---|---|
| DAY | Ends with the current trading session. |
| GTC — Good 'Til Cancelled | Continues until cancelled. |
| GTD — Good 'Til Date | Ends with the trading session on the selected date. |
Check the selected account and order-entry path
In a manual order-entry window, the TIF selector offers options based on the selected account's connection technology. Choosing GTD opens a date selector. If an option is missing, check the connection's support rather than assuming every account offers it.
For a NinjaScript strategy, TimeInForce applies to strategy-generated orders and defaults to GTC. NinjaTrader warns that a broker/exchange combination can reject an unsupported TIF sent by a strategy. The selector's filtering and a script's settings are different paths; verify the actual strategy instance and connection.
GTD on Rithmic requires a connected NinjaTrader
The Order State Definitions reference explicitly says Rithmic and FXCM do not support GTD natively: NinjaTrader submits these orders as GTC and simulates the date-based cancellation locally. The documentation requires NinjaTrader to be connected for that simulation to function.
This is an exception to assuming the broker handles every expiry. A GTD date shown in the platform is not proof that the provider will cancel the order while NinjaTrader is offline. For these connections, inspect the live order state after an interruption instead of treating the elapsed date as confirmation.
Why a GTC strategy order can still cancel at session close
GTC does not prevent another rule from cancelling an order. NinjaScript's IsExitOnSessionCloseStrategy is a separate setting: when enabled, it cancels strategy-generated orders and closes strategy positions at session close. It defaults to true; inspect the instance rather than relying on the default.
ExitOnSessionCloseSeconds sets the real-time lead time before that exit, using the EOD setting in the strategy's Trading Hours template. Its default is 30 seconds, and it does not change historical backtest exit timing.
For example, a strategy using GTC with session-close exit enabled can cancel its working orders before the session ends. That outcome does not mean the orders secretly used DAY. OCO is another separate cancellation relationship: a linked order's outcome can cause cancellation regardless of the expiry setting.
Confirm the submitted order, not just the entry selector
In Control Center > Orders, check the order's TIF, account, instrument and State. The Name, Strategy and OCO fields help identify whether strategy or linked-order behavior explains a cancellation. Review Filled and Remaining separately when an order has partially executed.
Cancel pending means a cancellation request has been submitted; Cancelled represents confirmation. Likewise, a disconnected platform or a restarted application does not establish the broker's current order state. Check that state through the connection or broker before concluding an order expired.
Official sources
Platform monitoring
Keep recovery and order state in view
Ninja Watchdog monitors NinjaTrader and supports recovery after platform interruptions. It does not directly place, modify or cancel orders. Email alerts are available today; SMS and WhatsApp are coming soon.
