Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
GTC order are being cancelled?
Collapse
X
-
Comment
-
Hello defa0009,
Apologies, I read Just using this code and looked at the code in the code block and saw:
if(State == State.SetDefaults) {
TimeInForce = TimeInForce.Gtc;
}
EnterLong();
ExitLongLimit(price, name);
ExitLongStopMarket(price, name);
I was not seeing in the code block that the overload with isLiveUntilCancelled was used. Thank you for clarifying this is not the code you are using and the actual code you are using is below the code block.
Please enable TraceOrders in State.Configure and re-run the script, then save the output to a text file by right-clicking the output window and selecting Save as.
Also, please print the order.ToString() at the top of OnOrderUpdate().
Please attach the output text file to your next post.
Let us know the date and time the order was cancelled so we know where to look in the output..
This output will tell us what is happening to the order.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
52 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
29 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
194 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
355 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
274 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment