Reference sample for NinjaTrader 6.5.xxxx.x or greater.
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 liveUntilCancelled true and false. The comments contain a longer, more detailed explanation.
This reference sample demonstrates the following concepts:
- How to submit an order that stays active until it is explicitly cancelled
Another sample demonstrating how to explicitly cancel orders can be found here:
http://www.ninjatrader-support2.com/...ad.php?t=18890
Important methods and properties used include:
Other methods and properties of interest include:
Import instructions for NinjaTrader 6.5.XXXX.X or greater:
- Download the file contained in this thread to your PC desktop
- From the Control Center window, select the menu File > Utilities > Import NinjaScript
- Select the downloaded file