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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X