> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Keeping orders alive

The default behavior for **NinjaTrader** is to cancel limit orders if the trigger conditions are no longer true. It is possible to submit orders that stay active until cancelled by setting **liveUntilCancelled** to true. This sample demonstrates and explains the difference between submitting an order with **isLiveUntilCancelled** true and false. The comments contain a longer, more detailed explanation.

## Key concepts in this example

* How to submit an order that stays active until it is explicitly canceled
* Another sample demonstrating how to explicitly cancel orders can be found here: [Using CancelOrder() method to cancel orders](/developer/desktop-sdk/guides/educational-resources/reference-samples/strategy-overview/using-cancelorder-method-to-ca)

## Important related documentation

* [EnterLongLimit()](/developer/desktop-sdk/references/strategy/order-methods/managed-approach/enterlonglimit)
* [isliveUntilCancelled](/developer/desktop-sdk/references/strategy/order-methods/managed-approach/exitlonglimit)
* [CrossAbove()](/developer/desktop-sdk/references/common/analytical/crossabove)
* [CrossBelow()](/developer/desktop-sdk/references/common/analytical/crossbelow)

## Import instructions

1. Download the file contained in this Help Guide topic to your PC desktop
2. From the Control Center window, select the menu Tools > Import > NinjaScript
3. Select the downloaded file

[SampleIsLiveUntilCanceled\_NT8.zip](https://ninjatrader.com/support/helpGuides/nt8/samples/SampleIsLiveUntilCanceled_NT8.zip)