Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Same data feed, different charts (IB data and NT charts)

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

    Same data feed, different charts (IB data and NT charts)

    Hi there,

    Running NT 7.0.1000.18

    My broker and data feed is IB, and using NT charting.

    A couple issues.

    1) Time stamps are off - NT candle time stamps are about 1 minutes and 55 seconds faster then IB candles. For example, on a one minute IB chart, the current one minute candle forming is at time index 2:14 pm. That same one minute forming candle on NT platform will show a time index of 2:16 pm. While my computer clock will show a time of 2:15pm!

    2) The open of each candle is not synched between IB and NT charting. A 5-8 second delay exists between the open of an IB one minute candle and then a NT one minute candle, on the same chart. This leads to charts with vastly different appearances on all time frames (different highs and lows and closes and opens and candle bodies, for all time frames).

    This is rather frusratating. The same data feed that creates an IB chart is sent to NT. So why doesn't NT plot the exact same candles?? For instance, because it's the same data feed:

    1) The candle open and close time on both the IB and NT chart should be identical.

    2) The candle time stamp on both the IB and NT chart should be identical.

    Isn't that obvious?

    Any help would be appreciated.

    #2
    Hello achilles28,

    The time stamp in NinjaTrader is for the end of a bar. A bar on a one minute chart with a time stamp of 2:16 contains the data from 2:15-2:16.

    The time in NinjaTrader is based on your PC clock while the time in TWS is based on the time in TWS.

    You will want to sync your PC clock to the time in TWS.
    Christopher S.NinjaTrader Customer Service

    Comment


      #3
      Thanks Christopher. That did it! And thanks for the quick reply.

      Are you aware which time server IB TWS uses? I noticed after synching my PC clock to TWS clock, after 10 mins or so, the clocks are no longer synched?

      I contacted IB in the meantime.

      Comment


        #4
        Hello achilles28,

        I am not sure what IB syncs their clock to.
        Christopher S.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by achilles28 View Post
          Thanks Christopher. That did it! And thanks for the quick reply.

          Are you aware which time server IB TWS uses? I noticed after synching my PC clock to TWS clock, after 10 mins or so, the clocks are no longer synched?

          I contacted IB in the meantime.

          I do not think that you can perfectly synchronize TWS and your PC. There are several reasons for this:

          (1) Your PC is synchronized with the windows time server "time.windows.com", which is not reliable. The reason is that this server is used as a default server for all Windows operating systems. You can easily change the settings for your intenet time and select "pool.ntp.org" instead.

          (2) Per default Windows synchronizes your PC time only once per week. This can easily lead to a significant synchonrization error. What you can do is to select a faster update frequency. Select the Windows Start button -> enter "regedit.exe", then select "\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\serv ices\W32Time\TimeProviders\NtpClient" then double-click the parameter "SpecialPollInterval" The default value is "93a80" with a hexadecimal base (converts to 604800 seconds). Replace this enty with

          Value = 3600 (Basis = Decimal)
          alternatively e10 (Basis = Hexadecimal)

          To activate the new settings, you need to restart the Windows timer under the Windows system settings. Your PC clock will now be synchronized once every hour instead of once per week.

          (3) After this synchronization issu, you will probably note that the TWS timer lags about one second. The lag time probably depends on your location relative to the TWS backend server. I do not know exactly.

          (4) The main problem which remains, is that TWS real-time data is snapshot data (condensed ticks not real ticks) and that it comes without timestamps. Therefore NinjaTrader will use your system clock to add the timestamps to the incoming condensed ticks. As this is not done in real-time at the exchange, the time stamps added will show a lag. The lag will only show on real-time data. Historical minute data (backfill) from IB should not suffer from that lag, as it comes time-stamped. Historical tick data is not available from IB.

          If you need accurate timestamps to the second, then your only option is to subscribe to a professional grade datafeed that comes with timestamps. A good choice with Interactive Brokers would be Kinetick or DTN/IQ. With Kinetick you can first-connect to the data feed and second-connect to IB. All time stamps will be accurate to the second. DTN/IQ offers millisecond resolution, but NinjaTrader 7's granularity is limited to 1 sec.

          Comment


            #6
            Digging-up this old thread.....

            Only if there's a way to find out TWS's time server address or the server they use and use it in the Windows Time server settings and then increase the update frequency to once per hour in the method Harry provided.

            EDIT: Regardless of which time server I use in Windows, the time is always 1 sec faster than the clock on TWS. So I'm assuming the TWS clock is slower by 1 sec because of the load of the entire app? So I'm guessing, if you did use the time server TWS uses, it will still be off by 1 sec. Anyway, 1 second is close enough. The windows time sync frequency to 1 hour instead of 1 week makes the difference. Thanks Harry.
            Last edited by grazz; 09-16-2017, 01:24 PM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Radano, 06-10-2021, 01:40 AM
            19 responses
            606 views
            0 likes
            Last Post Radano
            by Radano
             
            Started by KenneGaray, Today, 03:48 AM
            0 responses
            4 views
            0 likes
            Last Post KenneGaray  
            Started by thanajo, 05-04-2021, 02:11 AM
            4 responses
            470 views
            0 likes
            Last Post tradingnasdaqprueba  
            Started by aa731, Today, 02:54 AM
            0 responses
            5 views
            0 likes
            Last Post aa731
            by aa731
             
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            11 views
            0 likes
            Last Post Christopher_R  
            Working...
            X