Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi instrument strategy help
Collapse
X
-
Multi instrument strategy help
I am wanting to combine instruments into a strategy but the example strategy SampleMultiInstrument is not enough for me to go off of. I should be able to set what instrument is being referenced or what instrument I am purchasing by setting the BarsInProgressIndex just as I would with Multi Time Frame, Correct? Also how can I reference commands like Close[0], High[0], Low[0] and Open[0] to a specific instrument and not just the primary?Tags: None
-
Hi Chris, correct BarsInProgress would let you know which bars index / instrument is calling the OnBarUpdate() method, for the order you need to be mindful the primary series will always be at 0, then your Add()ed ones will follow (per the order you have in the Initialize() Add calls).
For accessing bars data from other series, there's the MultiSeries variants of Close, High...etc as well, just add a s to them.
So would be then Closes, Highs, Lows and Opens
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
61 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
149 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment