Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Positions Array Correspondence to BarsInProgress

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

    Positions Array Correspondence to BarsInProgress

    I have read some contradicting information regarding how to use the Positions Array.

    I have the following in my strategy:

    BarsInProgress = 0 --- Index (do not submit orders against)
    BarsInProgress = 1 --- Instrument 1 Ticks (submit orders here)
    BarsInProgress = 2 --- Instrument 1 Minutes
    BarsInProgress = 3 --- Instrument 2 Ticks (submit orders here)
    BarsInProgress = 4 --- Instrument 2 Minutes
    BarsInProgress = 5 --- Instrument 3 Ticks (submit orders here)
    BarsInProgress = 6 --- Instrument 3 Minutes

    How would I reference the Positions Array for Instruments 1, 2, and 3?

    Is it:
    Positions[0] -> BarsInProgress = 0
    Positions[1] -> BarsInProgress = 1
    Positions[2] -> BarsInProgress = 3
    Positions[3] -> BarsInProgress = 5

    Or is it:
    Positions[0] -> BarsInProgress = 0
    Positions[1] -> BarsInProgress = 1
    Positions[3] -> BarsInProgress = 3
    Positions[5] -> BarsInProgress = 5

    Thanks,

    kc

    #2
    The second one is how it would work.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    57 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X