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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
52 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
142 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
160 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
96 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
276 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment