• 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

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.

    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Teebone21, Today, 05:03 PM
        1 response
        3 views
        0 likes
        Last Post Teebone21  
        Started by gbulle, Today, 01:17 PM
        4 responses
        14 views
        0 likes
        Last Post gbulle
        by gbulle
         
        Started by CougarMountain, Today, 03:55 PM
        0 responses
        4 views
        0 likes
        Last Post CougarMountain  
        Started by syxforex, Today, 01:13 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by pjsmith, Today, 01:17 PM
        2 responses
        6 views
        0 likes
        Last Post pjsmith
        by pjsmith
         
        Working...
        X