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 NullPointStrategies, Today, 05:17 AM
|
0 responses
51 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
127 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment