For example, if in the 60 min time frame in the 8:00 bar i EnterLong() the order executes at the opening price of the 8:02 bar. I'd like to have the order execute at the open of the 8:01 bar.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi-Time Frame Order Delay
Collapse
X
-
Multi-Time Frame Order Delay
I'm using a strategy that has multi time frames of the same instrument. CalculateOnBarClose = true, the primary time fame is the smaller, i.e. 1min. the secondary time frame is larger i.e 60min. I'm evaluating an indicator in the secondary time frame and entering the trade on the primary time frame. My problem is that when a bar in the secondary time frame evaluates true and I EnterLong() the order executes one bar late in primary time frame.
For example, if in the 60 min time frame in the 8:00 bar i EnterLong() the order executes at the opening price of the 8:02 bar. I'd like to have the order execute at the open of the 8:01 bar.Tags: None
-
darckee, yes this is possible as you can direct the order execution to different bars objects / instruments - http://www.ninjatrader-support.com/H...struments.html
Comment
-
darckeen, it would probably be easiest to print 'Positions' to the output window for this - http://www.ninjatrader-support.com/H...Positions.html
NinjaTrader 7 will offer a more detailed 'Strategies' tab for this - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html
Comment
-
Thanks for the help so far. A few more questions:
With a multi instrument strategy in backtesting the order of OnBarUpdate() always seems to go in the order that the instruments were Add() to the strategy. Will this hold true in live trading provided UpdateOnClose = true?
Also is there anyway to implement SetStopLoss() and SetProfitTarget() in another BarsInProgress?
Comment
-
darckeen,
When running a strategy live it doesn't matter what order you add them in. The events trigger in the order the data is received. If the primary is received first, then that will trigger first.
Set() are not tied to specific BarsInProgresses. They just work off the data. If price touches or passes the Set() order then the order will try to fill.Josh P.NinjaTrader Customer Service
Comment
-
Hi darckeen, I don't think there is a specific overload to access Performance by BIP or Instrument, but I can think of a workaround.
You can use Trade class to get trade information and then match the instrument provided in the IExecutions information for entry/exit.
Anyways, I'll leave this open so Josh takes a look at it on Monday to confirm.AustinNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
656 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
371 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 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
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment