Keeping orders alive

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Educational Resources > Reference Samples > Strategy >

Keeping orders alive

Previous page Return to chapter overview Next page

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


Important related documentation






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