Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with the aggregation of daily live bars

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

    Problem with the aggregation of daily live bars

    Hi there. I am using NT7 through eSignal. I have instructed the charts to download the whole contract for ES (S&P e-mini) Sep15 from its very beginning (June 2014) in "Daily" format, so the current last bar is always live / in real time (so they are historical, classic EOD data only until yesterday and today is always live), and that works ok.
    The problems start when I want to aggregate the daily bars into "N-day" bars, still with the last, current bar live / in realtime: the first part of data is ignored, although I have instructed the charts to load the whole history from a date well before the first trading date. Specifically, if I want to build a 2-day bar series (for example), the first day of the series is ignored. If I want to build a 4-day bar series, the first 2-day bar is ignored, and so on.... Clearly the daily, the 2-day and the 4-day are not in synch in this case. I suspect it has something to do with the timestamp at the close of bars rather than at the open, but I am scratching my head... Any suggestions?
    Thanks for your help.

    #2
    Hello magcf,

    Thanks for your post.

    Please provide a screenshot of your chart so I may assist further.
    BrandonNinjaTrader Customer Service

    Comment


      #3
      Pictures of the examples

      Thanks Brandon, here you go. In one pic you see the 2-day box on the daily, with the first daily bar ignored. In the other pic is the 4-day box on the 2-day bars, with the first 2-day bar ignored, which - in turn, in its construction - ignores the first daily bar. Of course both the pics are taken at the very beginning of the file. I have tried other even values of N-day bars as boxes with the same results. Mmmmhhh.....
      Attached Files

      Comment


        #4
        Hello magcf,

        Thanks for your reply.

        I am unclear from your screenshots what you see the problem to be. Note that bars are time stamped based on the closed of the bar. Please clarify if that does not explain the display of the bars to you.
        BrandonNinjaTrader Customer Service

        Comment


          #5
          The problem is that every higher time frame first box (the 2 built on 1, the 4 built on 2...) is off, and so is every following box, and the problem is compounded with bigger and bigger charts. Why is the first daily bar (which is only a green trait in the pic, having OHLC all the same) NOT part of the first 2-day box? Why is the first 2-day bar NOT part of the first 4-day box? And given the fact that the first 2-day box ignores the first daily bar, the first 2-day part of / included in the 4-day box has ignored the first 3 days of data (2 itself plus one from the smaller chart's construction). I have verified it with the data box as well. I know eSignal timestamps the open, but there's no problem intraday, where the first minute is the first in every larger time frame, is part of / is included correctly in every higher time box.
          Last edited by magcf; 08-17-2015, 12:40 PM.

          Comment


            #6
            Hello magcf,

            Thanks for your clarification.

            I have verified that the first bars for the data series are not being displayed. The bars after however are being properly calculated. Additionally, if you look at the bars using the DataBox you will see that the values are properly plotted. So this means that the bars after are properly calculated and any scrips will properly calculate with all data.
            I will submit to development to look into resolving that the first bars are not being displayed however.
            BrandonNinjaTrader Customer Service

            Comment


              #7
              Thanks Brandon. As I have explained, the error gets compounded moving to larger and larger charts, larger charts inherit all the errors behind in smaller charts.
              The first 2-day ignores the first day. The first 4-day box ignores the first 2-day, which has ignored the first day: so the first 4-day box ignores the first 3 days of data. The same for the 8-day box ignoring the first 4-day, which ignores the first 2-day which ignores the first day, so that the 8-day starts after 7 days, and so on. Every N-day chart ignores the first (N-1) days since the start of the data (which is like saying that the first N-day box starts with day number N loaded).

              Comment


                #8
                Hi Brandon. I just wonder whether there has been any progress in fixing this issue of the N-day boxes ignoring the first N-1 days from the beginning of the file, making all the N-day boxes actually 1 day off
                Thanks for your help.

                Comment


                  #9
                  Originally posted by magcf View Post
                  Thanks Brandon. As I have explained, the error gets compounded moving to larger and larger charts, larger charts inherit all the errors behind in smaller charts.
                  The first 2-day ignores the first day. The first 4-day box ignores the first 2-day, which has ignored the first day: so the first 4-day box ignores the first 3 days of data. The same for the 8-day box ignoring the first 4-day, which ignores the first 2-day which ignores the first day, so that the 8-day starts after 7 days, and so on. Every N-day chart ignores the first (N-1) days since the start of the data (which is like saying that the first N-day box starts with day number N loaded).
                  What session template is applied to the barSeries. The ETH template already spans 2 days, so will throw things off if you use it to do amalgamations? Have you tried using a RTH template?

                  Comment


                    #10
                    Originally posted by magcf View Post
                    Thanks Brandon. As I have explained, the error gets compounded moving to larger and larger charts, larger charts inherit all the errors behind in smaller charts.
                    The first 2-day ignores the first day. The first 4-day box ignores the first 2-day, which has ignored the first day: so the first 4-day box ignores the first 3 days of data. The same for the 8-day box ignoring the first 4-day, which ignores the first 2-day which ignores the first day, so that the 8-day starts after 7 days, and so on. Every N-day chart ignores the first (N-1) days since the start of the data (which is like saying that the first N-day box starts with day number N loaded).
                    I have checked this issue and nothing is off. Everything works as expected. Maybe you have simply not understood how to read the box.

                    The 4-day box does not "ignore" the first 3 days, but it ignores the first 4 days, for which no box is plotted. All consecutive boxes are plotted correctly.

                    The point here is that a price bar is plotted at the end of the period that it covers. The box is plotted around the period that it covers. Please see chart attached for explanation.
                    Attached Files

                    Comment


                      #11
                      Originally posted by Harry View Post
                      I have checked this issue and nothing is off. Everything works as expected. Maybe you have simply not understood how to read the box.

                      The 4-day box does not "ignore" the first 3 days, but it ignores the first 4 days, for which no box is plotted. All consecutive boxes are plotted correctly.

                      The point here is that a price bar is plotted at the end of the period that it covers. The box is plotted around the period that it covers. Please see chart attached for explanation.
                      Harry: I agree 100% with you how the box is built. A 2-day box closes with day 2 close. A 4-day box closes with day 4 close. And so on. And that's the problem in my pictures, both taken at the very beginning of the file: the first 2-day box of the whole series closes with the close of third day, not the second. In the first pic, the very first days of data are only a trait, O H L C being the same: why is the very first day not considered as day 1 in the construction of the very first 2-day box? If the plotted 2-day box is the correct one, there should be 2 daily bars/traits left out before it, like in your pic, 4 bars before the 4-day box.

                      In the pic you can see the first 2-day box is made of the following two daily traits, the very first is left out. Those 2 daily traits after the discarded first one make the first 2-day bar you see in the other pic, and even here this first 2-day bar is not part of the very first 4-day box, the following 2 2-day bars are. And that makes everyone ahead off.

                      The first 2-day bar (discarded in the construction of the first 4-day box) is actually made of days 2 and 3 from the beginning of the file, so the problem remains for everyone ahead, every one is one day off.

                      I will try again with the December contract, from its very beginning (according to eSignal). Maybe because they timestamp the open instead of the close.

                      I thought about traying RHT like Koganam suggests, but that would not reflect the entire session of the ES, and I need to keep the session on ETH for the intraday charts.

                      Comment


                        #12
                        Hello,

                        Thanks for your reply.

                        This is being looked into for NinjaTrader 8.
                        BrandonNinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_Brandon View Post
                          Hello,

                          Thanks for your reply.

                          This is being looked into for NinjaTrader 8.

                          Thanks Brandon, very pleased to hear that.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by sephichapdson, Today, 11:36 PM
                          0 responses
                          1 view
                          0 likes
                          Last Post sephichapdson  
                          Started by bortz, 11-06-2023, 08:04 AM
                          47 responses
                          1,612 views
                          0 likes
                          Last Post aligator  
                          Started by jaybedreamin, Today, 05:56 PM
                          0 responses
                          9 views
                          0 likes
                          Last Post jaybedreamin  
                          Started by DJ888, 04-16-2024, 06:09 PM
                          6 responses
                          19 views
                          0 likes
                          Last Post DJ888
                          by DJ888
                           
                          Started by Jon17, Today, 04:33 PM
                          0 responses
                          6 views
                          0 likes
                          Last Post Jon17
                          by Jon17
                           
                          Working...
                          X