Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 CortexZenUSA, Today, 12:53 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by CortexZenUSA, Today, 12:46 AM
      0 responses
      1 view
      0 likes
      Last Post CortexZenUSA  
      Started by usazencortex, Today, 12:43 AM
      0 responses
      5 views
      0 likes
      Last Post usazencortex  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      168 responses
      2,265 views
      0 likes
      Last Post sidlercom80  
      Started by Barry Milan, Yesterday, 10:35 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Working...
      X