Thank you very much in advance for any guidance you might provide.
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!
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
NinjaTrader
Can Native Real-Time Timestamps be Read in OnBarUpdate?
Collapse
X
-
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.
-
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?
-
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.htmChelsea B.NinjaTrader Customer Service
Comment
-
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
-
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 andrewtrades, Today, 04:57 PM
|
1 response
5 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
3 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment