Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

bar# correspondence between timeframes

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

    bar# correspondence between timeframes

    Hello,
    Given two series of the same instrument, 1-tick and 2-ticks, I identify a 1-tick bar (programmatically) by its bar#, say 1234. Is it possible to know to which 2-tick bar# the 1234 corresponds to?
    The correspondence of the two series using the timestamps of the bars is not accurate enough because several bars can have the same timestamp.
    Any suggestion is much appreciated. Thank you.

    #2
    Hello utilizator,

    Thank you for the post.

    I wanted to check, in your script what is the primary? Is the 2 tick the primary and the 1 tick is the secondary? If so, that would be very similar to the example we show in the help guide for shared timestamps and the order of processing: https://ninjatrader.com/support/help...meFrameObjects

    Visually it would be difficult to tell which bar this applies to however the processing would happen in contrast to the description in the help guide. The primary would always be processed first in that situation so depending on what your overall goal is for this comparison it would need to account for the order the series are processed in a shared timestamp scenario.


    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,
      Thank you for the link. The 1-tick series is the main one in my case.
      Should I understand that finding the precise correspondence between bar numbers is not actually possible? Thank you.

      Comment


        #4
        Hello utilizator,

        There would not be a specific way to match the primary bar index to another bar index directly, you can generally use the time stamp unless it was shared. In that case it would require the order of OnBarUpdate to further determine that. In programming OnBarUpdate is called in a specific way for this situation so that could be used to do logic. I am not certain what the overall goal is in your script here to provide more detail on this question.


        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        606 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        353 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
        560 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        561 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X