Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug in MultiDataSeries Logic

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

    #16
    Holiday Calendar for Session Manager

    Just want to add another suggestion, although this is perhaps less important.

    To cope with the shown problems, it would be necessary to enhance the session manager, by specifying the first session of the trading day.

    Another possible improvement would be a holiday calendar, allowing to define specific sessions for holidays. I remember that even very simple software, such as QuoteTracker, comes with a holiday calendar.

    Comment


      #17
      Originally posted by Harry View Post
      Just want to add another suggestion, although this is perhaps less important.

      To cope with the shown problems, it would be necessary to enhance the session manager, by specifying the first session of the trading day.
      @Harry: I admit that I only looked briefly into it You dedicated already a lot of time to this!
      My point is that for day bar generation I suggested hard-coding the first session the session that contains the floor opening for a number of known symbols of globex. Example for CL future: the session that contains the time 9:00 EST would be assigned first session of the day. Then you would calculate the day bars based on this first session and the day bar would only be available after the close of the last session before 9.00 EST the next day. (allthough NT seems to timestamp them wrongly as you demonstrated)
      This was meant as a temporary fix , and it seems the same as you suggest in the lines above
      Let us see what solution comes up from Ninja
      regards

      Comment


        #18
        Originally posted by zweistein View Post
        @Harry: I admit that I only looked briefly into it You dedicated already a lot of time to this!
        My point is that for day bar generation I suggested hard-coding the first session the session that contains the floor opening for a number of known symbols of globex.
        regards
        NinjaTrader runs with different daily data providers. Some offer RTH data and others offer ETH data. So depending on what the data contains the time stamp of the daily bar must match its content. That is pretty easy.

        If you look at a NinjaTrader 5 min bar, it has a time stamp at the end of the 5 minute period that it covers.

        And if you look at a daily bar, it should have a time-stamp at the end of the session that it refers to. So if Kinetick gives us data for the ETH session, the time stamp simply needs to reflect the end of the ETH session, which for CL would be 5:15 PM Est.

        If you timestamp bars at the beginning of the period that a bar covers, you get it all wrong.
        Also there is nothing to be coded, it is a question of formatting the data correctly and not inserting all symbols at 9:30 Est, because it is easier to achieve.

        If a daily bar has a timestamp at its session end, it will also be correctly inserted, if I add a data series. Currently today's bar is inserted at 9:30 AM, what joke as what is inserted at 9:30 is only known this evening (which explains that the chart remains empty).

        Comment


          #19
          Harry and zweistein,

          Thank you for your posts. This limitation is indeed a systematic limitation with how daily bars are built internally. In the past few days we have been exhaustively exploring every angle possible, but unfortunately at this point in time there is no solution to this. You would need to use the session template the daily bars are built from and not a different custom one. If the daily bars were RTH, you would need to use the appropriate RTH session template. If the daily bars were ETH, you would need to use the single session-ed ETH session template. For instance, the ES would need the ‘CME US Index Futures’ session templates.

          The solution we have already been discussing internally and put on our development cycle list since Josh's last post is actually the same idea you thought of. We are looking to improve the Session Manager with some way to specify the start or end of a trading day. As for the Holiday list, this is something we plan to add at a later date.
          RayNinjaTrader Customer Service

          Comment


            #20
            If the Kinetick daily bars are stamped 9:30 EST, does that mean that they have been built from the night session?

            Kinetick bars are data-wise built from the full ETH session, but if I use the same ETH session template for intraday data, it does not work, as the chart below shows. The chart uses an ETH session, which is exactly the session that Kinetick data reflects.

            In my opinion there is no way to add a daily data series from Kinetick data to an intraday chart in a correct way.
            Last edited by Harry; 02-23-2011, 06:31 PM.

            Comment


              #21
              Harry,

              I am not sure what exactly you are referring to with 9:30 EST timestamp. The data will show up on your chart timestamped based on the session template selected. Can you please clarify where you are seeing a 9:30 EST timestamp? Thanks.

              You would want to use "CME US Index Futures ETH" and not any other session template for those daily bars. You will unfortunately not be able to use your custom ETH session template with multiple segments. I did not see any chart attached to your prior post that you were referencing in your post. Could you please reattach that? Thanks.
              Josh P.NinjaTrader Customer Service

              Comment


                #22
                Hi Josh,

                thanks for the answer. I assumed that Daily Bars had a time stamp independently from the selected session template. Now I understand a bit better, why the DailyBars showed up in the middle of the trading day.

                This happened because it was the end of the first intraday session. So the problems are

                - that daily bars have no timestamps reflecting the session template that was used when they had been created
                - that they do not align to the end of the trading day, but align to the end of the first intraday session

                This is probably a remainder from NT 6.5, as the difference between trading day and sessions as part of the trading day was only introduced with NT 7.0

                The trading day also is not clearly defined, as it cannot be specified by the user.

                Comment


                  #23
                  Another question:

                  If I add a daily data series to an intraday data series in an indicator or strategy, how can I tell NinjaTrader to use a different session template for the first as opposed to the second data series?

                  Correct insertion of daily data would require the ETH session template, correct calculation of the primary series might require a segmented instrument session template.

                  Comment


                    #24
                    Harry,

                    Through NinjaScript there is no way to define a session template to use for the series directly. The Help Guide's article on Multi-Time Frame & Instruments describes how to achieve this. (Current version has incomplete information so disregard it though)

                    The way the behavior works is as follows:
                    If a multi-series script adds an additional Bars object that already exists on the chart, the script will use the preexisting series instead of creating a new one to conserve memory. This includes that series' session template as applied from the chart. If the Bars object does not exist on the chart, the session template of the added Bars object will be the session template of the primary Bars object. If the primary Bars object is using the "<Use instrument settings>" session template then the additional Bars objects will use the default session templates as defined for their particular instrument in the Instrument Manager.
                    All in all, what you would likely need to do depending on how you have everything setup is to create a chart with a daily series added onto it with the session template you want to use on the daily series. Then add the script onto that multi-series chart so it would grab the session template from the daily series already on the chart.

                    You can test if your script is using the desired session template for the various Bars objects by printing the session template information.
                    Code:
                    BarsArray[0].Session.TemplateName
                    BarsArray[1].Session.TemplateName
                    etc.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      Josh,

                      thanks for the detailed answer. I admit that I have not understood exactly, which templates are used, if I have two different instruments, but if I want to know I can call the values and print them, so I will find out.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by argusthome, 03-08-2026, 10:06 AM
                      0 responses
                      68 views
                      0 likes
                      Last Post argusthome  
                      Started by NabilKhattabi, 03-06-2026, 11:18 AM
                      0 responses
                      41 views
                      0 likes
                      Last Post NabilKhattabi  
                      Started by Deep42, 03-06-2026, 12:28 AM
                      0 responses
                      24 views
                      0 likes
                      Last Post Deep42
                      by Deep42
                       
                      Started by TheRealMorford, 03-05-2026, 06:15 PM
                      0 responses
                      27 views
                      0 likes
                      Last Post TheRealMorford  
                      Started by Mindset, 02-28-2026, 06:16 AM
                      0 responses
                      54 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Working...
                      X