Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-instrument indicator - daily bar sync issues.

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

    Multi-instrument indicator - daily bar sync issues.

    In an indicator with 2 instruments of Daily bars, NT7 is supposed to ensure that their bars are synchronized before OnBarUpdate is called. So, for example, in OnBarUpdate, Closes[0][0] and Closes[1][0] should always give prices for the same day (unless there is no quote for that day for one of the instruments, in which case you will get the most recent Close).

    That is in fact what happens, but only if both instruments use the same session template. If both instruments use, say "US Equities RTH", then their bars will be synchronized. If one instrument uses "US Equities RTH" and the other uses "Default 24/7", then the bars will NOT be synchonized, i.e. Closes[0][0] and Closes[1][0] will refer to different days, even though the timestamps on both bars will be 12:00:00AM. (Synchronization can be forced if the chart displays the "Default 24/7" instrument, but forces "US Equities RTH" as the session template).

    This is wrong, and can lead to serious and non-obvious errors based on how the session template for a particular instruement is set, or even the chart settings for the Data Series.

    The Daily Close is the Daily Close, and shouldn't change based on the Session Template. Session Templates are useful intraday, to exclude after-hours transactions, but they should not change the behavior of Daily analysis.

    Please fix this and make sure that Daily bars objects are always synchronized regardless of the instrument session template settings, or the session template setting used in the chart.

    How to reproduce:
    Choose 2 stocks. In the instrument manager, set the session template for one stock to "US Equities RTH", and the other "Default 24/7". Open a new Daily chart for one stock, and add the Data Series for the other to the chart.

    Add the KDTestDaily Indicator (file attached) to the chart, entering the symbol for the secondary instrument as the "Symbol2" parameter. The output window shows that the Bars are not synchronized. If you force "US Equities RTH" on the DataSeries displayed in the chart, the bars in the indicator will now be synchronized.
    Attached Files

    #2
    Thanks. We will look into it.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      kdoren,

      In the next version you will see the proper timestamp prints based on session templates. Thanks for reporting.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Thanks; although just to be clear, I'm asking that daily bars NOT be affected by session templates.

        No session template setting should ever affect the behavior of daily bars (whether in the instrument manager, chart Data Series settings, or strategy settings). I haven't tested but I expect this issue also affects strategies.

        Comment


          #5
          kdoren,

          Session templates for sure influence daily bars. Daily bars are built based on the session template. If your session template says 10PM - 10PM = 1 session or 1 day then those bars end at 10PM. If you had another that says it ends at 12AM, when it is 10PM and the first bars closed, the 12AM bars did not close yet. It will probably make more sense when you actually see it in action in the next version.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

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