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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    144 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
    283 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X