Thanks
Announcement
Collapse
No announcement yet.
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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
549 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment