So I wonder if instead I should place my order logic in a custom timer event method like the one listed in the reference samples. That way it would only check every 1000ms to see the status of the market and make any order changes. Thanks for input.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Race conditions - order submission
Collapse
X
-
Race conditions - order submission
I'm wondering which method I should put my limit orders submissions in to that would avoid race conditions during a quickly moving market. I would have a List<LadderRow> of limit orders on the book and would want to remove/cancel limit orders as the market ticked in any direction. It would seem I'd want to put them in the OnBarUpdate() method. But what would happen if say the bid price moved up a tick and down a tick before my order confirmation could be received? I'd think a cancellation order might be sent before I received a order received packet.
So I wonder if instead I should place my order logic in a custom timer event method like the one listed in the reference samples. That way it would only check every 1000ms to see the status of the market and make any order changes. Thanks for input.Tags: None
-
If you do it off of OnBarUpdate() and had CalculateOnBarClose = false then you would run into issues you suspected in your post. Using a custom event could be one way to go about this. You could also program it to not do anything till modification confirmation has been received.Josh P.NinjaTrader Customer Service
-
Thanks for the confirmation Josh. I'm going to test out utilizing the OnOrderUpdate method. Is this what you were referring to in your last sentence?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
633 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
364 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
567 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment