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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X