Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar index, mult time frame

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

    Bar index, mult time frame

    having a few issues with bar index for multi time frame strategy.

    If I have 2 time frames, 100 Tick (index 0) and 50 Tick (index 1) with CalculateOnBarClose = True and I say:

    Code:
    If(BarsInProgess == 1)
    {
    if(Lows[0][0] < Lows[1][0])
    {
    x=1
    }
    
    }
    Am I correct in thinking that that say if the low of the most recently CLOSED 100 Tick bar is less then the most recently closed 50 Tick Bar?

    If that is the case how would you reference the current 100 tick bar that is currently being formed?

    I am asking as I have some logic that is not working as I thought.

    #2
    Hello GKonheiser,

    To reference the bar being formed, you would need to have the script running with calculate on bar close set to false and be in real time data.

    If the script is calculate on bar close true, the bars array object will update when the bar closes. The same is true for historical which only contains end of bar information anyway.

    With calculate on bar close false, in real time Close[0] refers to the currently building bar.

    Below is a link to the help guide on Multi-Time Frame & Instruments. Please see the section 'How Bar Data is Referenced'.
    http://www.ninjatrader.com/support/h...nstruments.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X