Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can Native Real-Time Timestamps be Read in OnBarUpdate?

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

    Can Native Real-Time Timestamps be Read in OnBarUpdate?

    I'm running NinjaTrader version 8.0.23.2 64-bit connected to Kinetick (via IQFeed). Per my interpretation of the NT8 Help Guide topic "Data by Provider," I believe each tick that NT receives in real-time from Kinetick/IQFeed comes with a "Native Real-Time Timestamp." I'm currently developing an indicator that I intend to use with Daily bars, and with Calculate set to "On each tick." Within OnBarUpdate, is there any way for me to read the "Native Real-Time Timestamp" of the tick that triggered the OnBarUdate call and, if yes, how?

    Thank you very much in advance for any guidance you might provide.

    #2
    On second thought, I might be totally misguided here. I'm assuming the "Native Real-Time Timestamps" for ticks associated with Daily bars look something like "03.05.2021 14:59:00:480," not just "03.05.2021." So, I should really ask this first: Do "Native Real-Time Timestamps" for ticks associated with Daily bars contain date and time information, or just date information?

    Comment


      #3
      Hello NtFan,

      Real-time updates will update OnMarketData().
      https://ninjatrader.com/support/help...marketdata.htm

      Or you can add a 1 tick series to have OnBarUpdate() update with the time for each tick.
      https://ninjatrader.com/support/help...dataseries.htm
      https://ninjatrader.com/support/help...inprogress.htm
      https://ninjatrader.com/support/help...urrentbars.htm
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hi ChelseaB,

        Thank you very much for the suggestions. Both of them are interesting, but each has a drawback:

        1. Using OnMarketUpdate the timestamps are out-of-date because OnMarketUpdate is called after OnBarUpdate (per the NT8 Help Guide).
        2. Using a 1-tick series the timestamps that are up-to-date, but my indicator takes quite a while to load when it's first applied to a chart.

        Ideally I'd have access to a method like OnMarketUpdate that is called before OnBarUpdate. Please let me know if such a method is available, otherwise I'll forge ahead with 1 or 2.

        Thanks again for your guidance.

        NtFan

        Comment


          #5
          Hello NtFan, thanks for your reply.

          The only available method for instantaneous market data access would be the OnMarketData method. When the time comes when OnMarketData and OnBarUpdate should be called, OnBarUpdate will be called first because a new bar must be formed with OnBarUpdate. The stream of data from OnMarketData will remain constant whereas OnBarUpdate will only call once each bar (if Calculate == Calculate.OnBarClose), but the times that OnBarUpdate will be called, it will show up before OnMarketData.

          Please let me know if I can assist any further.
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by samir, Today, 07:00 PM
          0 responses
          9 views
          0 likes
          Last Post samir
          by samir
           
          Started by travisloneker, Today, 06:52 PM
          0 responses
          6 views
          0 likes
          Last Post travisloneker  
          Started by InfraredBusa, Today, 05:50 PM
          0 responses
          3 views
          0 likes
          Last Post InfraredBusa  
          Started by White Fork, Today, 04:56 PM
          1 response
          8 views
          0 likes
          Last Post White Fork  
          Started by steveyinyang, Today, 02:48 PM
          3 responses
          22 views
          0 likes
          Last Post steveyinyang  
          Working...
          X