Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi instrument strategy help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    41 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X