Thanks
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Close PartFilled order
Collapse
X
-
Hello kiss987,
Thank you for writing in. Please refrain from posting the same question in multiple threads. If you call ExitLong() and ExitShort() without a quantity or entry signal, it will render your entire position flat. Once your position is flat, open orders will be cancelled automatically.
By default, unfilled orders will expire at the end of the bar unless live until cancelled is set to true. So if your strategy had a partially filled live until cancelled order and the rest of the order had not been cancelled for another reason, it would still exist to be potentially filled in the future until you call the CancelOrder() method or its Time in force is reached or until ExitLong() or ExitShort() had flattened your position.
In this scenario it would be better practice to call CancelOrder() first to prevent the rest of the order from filling as you are flattening the position using ExitLong().
For an example using the CancelOrder() strategy, please see here: http://ninjatrader.com/support/forum...ad.php?t=18890
The CancelOrder() method is also in our help guide: http://ninjatrader.com/support/helpG...ancelorder.htm
Please let me know if you have any questions.Michael M.NinjaTrader Quality Assurance
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
|
80 responses
19,666 views
5 likes
|
Last Post Today, 09:29 AM | ||
Started by adeelshahzad, Today, 03:54 AM
|
2 responses
15 views
0 likes
|
Last Post
by adeelshahzad
Today, 09:27 AM
|
||
Started by dappa, Today, 09:18 AM
|
1 response
5 views
0 likes
|
Last Post Today, 09:25 AM | ||
Started by bill2023, Yesterday, 08:51 AM
|
5 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 09:24 AM
|
||
Started by frankthearm, Today, 09:08 AM
|
1 response
3 views
0 likes
|
Last Post Today, 09:23 AM |
Comment