Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backfill from NT server. Correct DateTime?

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

    Backfill from NT server. Correct DateTime?

    I have a gain demo account and have used the NT server to backfill forexdata. Now I'm wondering what the time on this backfilled data actually represents.

    I live in the UK and it looks like the data is in UK time, since the latest data shows the current time according to the timesettings of my PC. So I guess that the data on the server has a timestamp and when I backfill it will apply some correction to match the data with the current time on my PC. Am I correct?

    But of course there are things like daylight saving time that can mess up things. For example, if the stream originates from the USA and the timestamp includes American DST, then I have to take that into account since the USA switches to and from DST on different dates than the UK. So the time on the data may not represent the correct UK time all the time. Am I correct?

    I hope my question is clear and that you can clarify how time is handled when doing a backfill.

    #2
    Hello FireFly,

    Thank you for your post.

    The time for when the data is created is based on the market, but it is displayed within NinjaTrader is based on your system PC clock.

    As far as changes made to time that should not present an issue since the historical data is recorded in real-time from GAIN. The historical data is from the NinjaTrader servers from the time it was recorded and then adjusted to be displayed depending on your PCs time offset.
    Ryan O.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your answer, but I'm still not sure you get my point...

      The data is adjusted based on my PC clock. Currently that clock is not in DST. But if I look at the data from, say 31 July 2009, would that time then represent DST or not? Since at that date there would be DST.

      The other question that I still have is that when the data is generated in a certain country, I guess it takes the time as is. So in January it will be timestamped with non-DST and in July with DST.

      It matters to know this stuff because not all countries switch to DST (at the same time). If I want to match the pricedata with macrodata I need to know if I need to apply certain offsets by myself.

      Comment


        #4
        Hi,

        The data will include daylight savings time, but that will not make a difference.

        The data will display the particular time of the market it was recorded at, and if that includes a daylight savings time adjustment that will be reflected in the data.

        However, since the data is displayed for your local time that data will be adjusted accordingly based on your system clock. If the data includes daylight savings time, but your local clock has not made that transition yet it will still display for the time it was recorded offset for the difference in current time zone. Once the change locally is made as well the same thing will occur.
        Ryan O.NinjaTrader Customer Service

        Comment


          #5
          OK, but the point is I'm talking about a backfill here, not live data. So if my PC is CURRENTLY in non-DST, then also backfilled data for July will be in non-DST (my local DST) so it will reflect the DST at the source of the data but not my local DST.

          In other words, the backfilled data for July will have a timeshift with respect to data that was recorded LIVE on my PC in July, since then DST was applied. Also, I would get different results when I backfill on a date that DST is active.

          Am I correct in these assumptions?

          Comment


            #6
            Hi,

            The data you use for backtesting is time-stamped with the server time, but any differences between the data and the time on your PC, and necessary conversions based on DST will be handled by the program, so you should not need to manually adjust.

            A couple things to make sure everything works as expected.
            1. Please make sure you have .NET 3.5 installed on your PC.

            2. Please sync your PC clock. You can sync your PC clock by double clicking on the clock in the lower right corner of your desktop. Once you have done that, click on Internet Time tab and then click Update. Your PC clock should now be updated.
            Ryan O.NinjaTrader Customer Service

            Comment


              #7
              OK that's clear

              However I do recall that I had this type of problem about 2 years ago when I used the IB backfill for some ES futures contracts. I had to manually adjust things (wrote a routine for that in my strategy) because some data was backfilled when DST was active and some was backfilled on another date when it wasn't active. It messed up my data. I hope this is a thing of the past?

              Comment


                #8
                Hello,

                It may have been a consequence of the data from IB, as well as the .NET framework version since the changes necessary to handle this were included with .NET 3.5.

                I can not say except that the issue should no longer occur as it did in the past.
                Ryan O.NinjaTrader Customer Service

                Comment


                  #9
                  OK thanks!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Stanfillirenfro, Today, 07:23 AM
                  1 response
                  2 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by cmtjoancolmenero, Yesterday, 03:58 PM
                  2 responses
                  20 views
                  0 likes
                  Last Post cmtjoancolmenero  
                  Started by olisav57, Yesterday, 07:39 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by cocoescala, 10-12-2018, 11:02 PM
                  7 responses
                  943 views
                  0 likes
                  Last Post Jquiroz1975  
                  Started by oviejo, Today, 12:28 AM
                  1 response
                  12 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X