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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
163 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
81 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
125 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
206 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
184 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment