07-20-2009, 01:51 PM
|
#1
|
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Strategy: Using CancelOrder() method to cancel orders
Reference sample for NinjaTrader 6.5.XXXX.X or greater.
When using NinjaTrader's Enter() and Exit() methods, the default behavior is to automatically expire them at the end of a bar unless they are resubmitted to keep them alive. Sometimes you may want more flexibility in this behavior and wish to submit orders as live-until-cancelled. When orders are submitted as live-until-cancelled, the way to cancel them is by using the CancelOrder() method.
This reference sample demonstrates the following concept:- Submitting live-until-cancelled entry orders
- Manually cancelling orders
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
Josh
NinjaTrader Customer Service
|
|
|