• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Best way to calculate look up 'where I am' in a multi timeframe case

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

    Best way to calculate look up 'where I am' in a multi timeframe case

    In a multi timeframe case, what is the best/efficient way to look up 'which bar I am in' from one timeframe to another?

    Let's say I am in BarArray[1] and wants to find which bar I am in, in BarArray[0]'s 'space',
    I know it can be done as

    BarArray[0].GetBar(Time[0])

    My question is, is this the best way, as I am doing a lots of this, among multiple timeframes, back and force...

    #2
    Hello,

    You would want to use CurrentBars[]

    http://www.ninjatrader.com/support/h...urrentbars.htm

    This can also be used to ensure enough bars have been loaded across all series so that you don't get out of bounds errors.

    Let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply, but you misunderstood my question.
      I am not talking about 'right now', I am talking about
      for any given bar in 5 min time frame, how would I calculate it's place in 2-min timeframe?

      Comment


        #4
        Hello,

        If that is the case then yes, this will be the simplest way to obtain this data. Sorry for the confusion, when I saw you were using Time[0] I assumed you just wanted to get the most current bar.
        LanceNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rwilliam, Today, 01:54 PM
        0 responses
        1 view
        0 likes
        Last Post rwilliam  
        Started by franco12364, Today, 11:27 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by YevhenShynkarenko, Today, 11:48 AM
        3 responses
        18 views
        0 likes
        Last Post YevhenShynkarenko  
        Started by NinjaTrader_ChrisL, Today, 11:21 AM
        0 responses
        21 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by lunardiplomacy, Today, 08:09 AM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Kate  
        Working...
        X