Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"Thanks for the great product and support. During this week of high volume trading, my QuoteTracker + IQ Feed setup never missed a beat. Also, thanks for your swiftness in responding to data issues. I was on ******* for a few years before I made the switch over early this year, and wish I had done it a long time ago." - Comment from Ken
"I'm satisfied with IQFeed. It's the most reliable and fastest quote feed I have ever used. Although I'm a resident in China, it's still very fast!" - Comment from Xiaofei
"DTN feed was the only feed that consistently matched Bloomberg feed for BID/ASK data verification work these past years......DTN feed is a must for my supply & demand based trading using Cumulative Delta" - Comment from Public Forum Post
"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"I'm very glad I switched to IQFeed. It's working perfectly with no lag, even during fast market conditions." - Comment from Andy via Email
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"I've been using Neoticker RT with IQFeed for two months, and I'm very happy with both of the products (I've had IQFeed for two years with very few complaints). The service from both companies is exceptional." - Comment from Public Forum
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"Interactive Brokers tick data was inconsistent, so I have switched to using DTN exclusively. It is great to no longer have to worry about my datafeed all day long." - Comment from Philippe
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »How are derivative bars built?
Author Topic: How are derivative bars built? (2 messages, Page 1 of 1)

Lav2018
-Interested User-
Posts: 10
Joined: Mar 15, 2018


Posted: Mar 15, 2018 04:57 AM          Msg. 1 of 2
I have a few technical questions regarding derivative bars in IQfeed. Apologies if I missed this information in the documentation, but I could not find it.

1. Lets say I have requested streaming bars with an interval of 60 seconds. In the messages my client receive, what will [DateTime] represent? Will it be the start time of the interval or the end time of the interval? E.g. Would 12:00:00 be for interval 2:00:00 to 12:00:59, or interval 11:59:01 to 12:00:00?

2. Within IQFeed, what determines when a bar is "finished" being built and sent out to my client? Is it my internal computer clock, IQfeed's server clock, or timestamps on ticks? If it is timestamps of ticks, then I suppose the bar won't be sent to the client until a tick with timestamp OUTSIDE that interval has arrived. That could cause delays in instruments with low volume.

DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006


Posted: Mar 15, 2018 10:29 AM          Msg. 2 of 2
1. Streaming bars and history all currently use the time from the end of the interval. If 12:00:00 started a new 1 minute interval, the interval would end at 12:00:59.999999 and the bar received would have a timestamp of 12:01:00.

2. You are correct, any method based on time to create a BC bar fails, so the only way you can guarantee that a bar has closed is to wait for a message to be received that is not part of the current interval for that symbol. That does certainly provide an opportunity for delays. So what you want to do is set the update interval to some value greater than 0.

The update interval is a time based catch to be sure you do not have to wait any longer than necessary to receive the current data. The update interval is used to trigger the sending of a BU bar when we have data on a symbol, but have not received data for [update interval] seconds.

Here is an example, with 60 second bars, and no update interval

We'll say trades occur at the following times:
12:00:00
12:00:14
12:00:48
12:00:59
12:01:00
12:01:01
12:01:02
12:02:15
12:02:16
01:04:17

This would be your expected outputs, notice the time delays in data return, but all bars are official and complete.

BC bar for 12:00 to 12:00:59 will be received at 12:01:00
BC bar for 12:01 to 12:01:59 will be received at 12:02:15
BC bar for 12:02 to 12:02:59 will be received at 01:04:17

Now with an update intervals of 1 second., you get more data to potentially process, but you always have current data, but since the BC bar is still sent you still know when a bar is officially complete.

BU bar for 12:00 to 12:00:59 will be received at 12:00:01
BU bar for 12:00 to 12:00:59 will be received at 12:00:15
BU bar for 12:00 to 12:00:59 will be received at 12:00:49
BC bar for 12:00 to 12:00:59 will be received at 12:01:00
BU bar for 12:01 to 12:01:59 will be received at 12:01:03
BC bar for 12:01 to 12:01:59 will be received at 12:02:15
BU bar for 12:02 to 12:02:59 will be received at 12:02:17
BC bar for 12:02 to 12:02:59 will be received at 01:04:17
BU bar for 1:04 to 1:04:59 will be received at 01:04:18

Let us know if you have any questions on this though and we would be happy to help further.

Tim
 

 

Time: Fri April 26, 2024 8:23 PM CFBB v1.2.0 8 ms.
© AderSoftware 2002-2003