Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Inconsistent Price Data Between Different PC's

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

    Inconsistent Price Data Between Different PC's

    Hi Everyone,

    I developed a strategy using NinjaTrader
    The strategy runs on my home PC for the last couple of months
    I'm working on migrating the work to AWS so I have an ec2 instance running NinjaTrader and I did align the timezones between the 2 computers to be mine (the strategy use the current time so I prefer to keep the code aligned)

    Everything looks good in terms of timezones until I run backtests - my home PC gets totally different results compared to the AWS PC (of course on same asset / timeframe etc..)
    Digging up the charts show that some days are completely not aligned in terms of data (different OHLC & volume) - it looks like completely different candles on the same day and minute

    (I can't compare real time data since both PC's use the same NinjaTrader account)
    I Would like to know how this kind of things occur and what can I do to fix them

    attaching 2 different screenshots for 2 different days that are totally different (right side - home PC, left side - AWS)

    Thanks
    Last edited by Incognito89; 07-20-2022, 06:25 AM.

    #2
    Hi Again,

    After more investigation the issue seems to be related to timezone but it still unclear how NinjaTrader is confusing the date & hours
    Adding to the above post...the issue occur on the AWS instance with no relation to my home PC which works fine
    While realtime data displayed in the right date, time and format historical data is off for some reason
    Attaching 2 screenshots (both taken on the same instance using the same chart) - one for realtime data which is aligned to the UTC+3 clock of the OS and the other is an historical price where
    NinjaTrader failed to determine the correct first bar of the session and pushed the session 3 hours creating an offset

    My guess is that it something related to the thing that the AWS ec2 instance have some core defaults to UTC clock (although I changed the timezone using the following - AWS link) to UTC+2 with the daylight saving option enabled which causing my time on the machine to be aligned with my own timezone which is UTC+3 (now)
    So the diff between the timezone defined to the default UTC timezone is 3 hours which can't be a coincidence

    I would like to hear how I can overcome this and still use my own timezone on the AWS instance and still to get consistent data in the correct date & time

    Thanks in advance
    Attached Files

    Comment


      #3
      Hello Incognito89,

      Thank you for your posts, and I apologize for the delay in reply - we've recently switched to a new Support system which created a bit of a backlog.

      Can you confirm the time zone set within NinjaTrader matches on both your local machine and the AWS instance (Tools > Options > General > Time Zone) and that these match the PC clock time zone as well on both?

      Have you reloaded all historical data after changing the AWS instance time zone? To do so, right click on a chart for the same date range and instrument you're testing with in the Strategy Analyzer, then select Reload All Historical Data.

      Thanks in advance; I look forward to assisting you further.
      Kate W.NinjaTrader Customer Service

      Comment


        #4
        Hi Kate,

        Sorry for late reply.

        TL;DR
        I was able to fix the issue by removing all historical data -> delete the cache folder content -> reload NinjaTrader

        Long story:
        The issue happened because of a timezone conflict.
        1. I created an EC2 instance (default timezone is UTC)
        2. Installed the NinjaTrader and entered it (UTC data was retrieved)
        3. I changed the timezone of the EC2 to match mine which is UTC+3 using AWS guide
        4. Entered the NinjaTrader and indeed saw that the application updated to UTC+3 under settings
        but
        and here things get weird
        as soon as I ran some backtest on this instance I saw that I'm missing some data points in certain hours
        I trade futures which trades 23 hours a day:
        in UTC they don't trade between 21:00-22:00
        in UTC+3 they don't trade between 00:00-1:00
        so I ended up with a NinjaTrader that sets to UTC+3 and is missing the data between 21:00-22:00 which is the UTC no trading hours

        One more things, when I deleted the cache folder I saw that the cache folder are splitted by timezone but I still had the issue and fixed it by removing all historical data -> delete the cache folder content -> reload NinjaTrader


        Hope it else others
        Thanks

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, Today, 10:57 PM
        0 responses
        6 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        7 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Working...
        X