Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to use time values from datafeed instead of Time[0]?

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

    Is it possible to use time values from datafeed instead of Time[0]?

    Hello,
    we are developing an indicator that depends heavily on the correct time whenever OnBarUpdate() is called. However, Time[0] may not return the correct local time, e.g. because the client's system clock may not be synchronized with a time server.

    Now I suppose that the realtime stock datafeed must contain not only stock data, but is also aligned with time data, i.e. every single tick coming in should come with a correct time stamp. This would make sense, because historical data are always displayed correctly.
    Is there any way to access the tick's time stamp in the indicator code? I tried MarketDataEventArgs.Time, but this also returns the incorrect system time.

    Looking forward to any comments on this,
    Johannes Neubarth

    #2
    SentiTrade,

    Can you please clarify what data feed you were using with MarketDataEventArgs.Time?

    Some data providers natively time stamp their data which means that data should be in line with their servers - however some providers are locally time stamped which means the time displayed is based off the local pc clock.

    You can see a list of these providers and their real-time time stamps from the following link:

    MatthewNinjaTrader Product Management

    Comment


      #3
      Matthew, thanks for the link - problem solved. We are using Patsystems data provider, so there are no native time stamps. Now I'm developing an alternative way to synchronize our indicator.
      Cheers,
      Hannes

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      164 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      319 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X