My question is reagrding the "life" of the order. I know that the order is cancelled at the end of the current bar and must be resubmitted. Does this have to be done in the lower timeframe or will the order be "live" until the next onbarupdate call from the primary time frame?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Life of unfilled orders
Collapse
X
-
Life of unfilled orders
I am working on a multi-Time frame strategy which places both Stop and Market entry orders. The orders are placed from the BarsInProgress==0 region but are indexed to the lower time frame.
My question is reagrding the "life" of the order. I know that the order is cancelled at the end of the current bar and must be resubmitted. Does this have to be done in the lower timeframe or will the order be "live" until the next onbarupdate call from the primary time frame?Tags: None
-
You would indeed need to cancel the order when your condition is no longer true. This can be done through a simple call to CancelOrder().
Updating stop prices works like how it does before. If you want to modify the order, call the order again to make the change.Josh P.NinjaTrader Customer Service
Comment
-
Thanks for the clarification. So if I am staying with the same type of Entry order IE Stop or Limit or StopLimit I do not need to cancel the previous roder than submit a new one with the new Entry Price? But if I am going to change the type of Entry then I would need to cancel the previous order before submitting the new one.
Comment
-
When using the technique where the order is placed each OnBarUpdate and not kept live until canceled and I change from a StopEntry to a Market or Limit Entry Order and I want to use the same IOrder entry name I won't I have to wait for confirmation of the canceled order in the OnOrderUpdate method before submitting the the new order to avoid losing the order info?
I am trying to avoid having to manage stops and targets for two seperate IOrder objects.
Comment
-
I do not recommend using the same IOrder object for separate orders. If you do you should wait for confirmation on a terminal state of the original order before replacing the object with the new order. If you don't wait for confirmation you run the risk of the order not going terminal and you lose all ability to control it after you overwrite the references.Josh P.NinjaTrader Customer Service
Comment
-
Where would be the best place to check for the Terminal state, OnExecution or OnOrderUpdate? I understand what you are saying about losing control of the order. The problem with seperate IOrder objects for each entry type comes when you place and manage the stop and target orders after the entry order has filled.
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