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)




"I just wanted to say how happy I am with your service. I was able to download the API docs last week and I was able to replicate Interactive Brokers historical bar queries and realtime bar queries over the weekend. That was about one of the fastest integrations that I've ever done and it works perfectly!!!!" - Comment from Jason via Email
"Boy, probably spent a thousand hours trying to get ******* API to work right. And now two hours to have something running with IQFeed. Hmmm, guess I was pretty stupid to fight rather than switch all this time. And have gotten more customer service from you guys already than total from them… in five years." - Comment from Jim
"I used to have *******, but they are way more money for the same thing. I have had no probs with data from DTN since switching over." - Comment from Public Forum Post
"The people at Nirvana have very nice things to say about your company and I can see why! Price and service is a potent combination." - Comment from Ed
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"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
"Everything is working amazing now. I'm already impressed with the true-tick feed of IQFeed and it's ability to support my 480 symbol layout." - Comment from Tyler via Email
"If someone needs the best quality data and backfill beyond what their broker provides at a rate that is the best in the industry, I highly recommend IQFeed." - Comment from Josh via Public Forum
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 »Building bars from ticks
Author Topic: Building bars from ticks (8 messages, Page 1 of 1)

dis
-Interested User-
Posts: 24
Joined: Apr 16, 2007


Posted: May 14, 2007 05:29 AM          Msg. 1 of 8
Hello Support,

I would like to ask you a question with regards to Level I data.

I want to build bars using Level I data. Is there a way to do this? Could you please tell me the steps of processing the set of Update/Summary messages to build a bar?

Your help in this regard would be greatly appreciated.

Thanks,

Alexander

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: May 14, 2007 09:35 AM          Msg. 2 of 8
Yes it certainly should be possible to build bars using level1 data.

This should be fairly straight forward. Please send me an email at developer support with more information as to what you are having problems with.

dis
-Interested User-
Posts: 24
Joined: Apr 16, 2007


Posted: May 18, 2007 09:30 AM          Msg. 3 of 8
Currently I build bars in such may:

Receive set of ticks(Update messages) which belongs to one minute.
For each tick I'm calculating average Bid/Ask value (Bid+Ask)/2. First becomes open, last - close, highest - high and lowest - low. The volume of bar is the sum of Last Size/Incremental Volume (field 8 of Summary/Update message). Is it ok?

BTW, field 18 of Summary message must be in HH:MM:SSc format. Actually, I receive ??:??c. It looks like HH:MMc, is it so?

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: May 18, 2007 09:36 AM          Msg. 4 of 8
I believe your method for building the bars is ok.

The documentation for field 18 was updated in 4.2.1.4 to coincide with the new servers which will go online soon. The current servers do not provide seconds in the timestamp.

The important thing to remember with that field is that the trade indicator (c) will always be the last character in the field.

dis
-Interested User-
Posts: 24
Joined: Apr 16, 2007


Posted: May 31, 2007 07:36 AM          Msg. 5 of 8
Hi Steve!

I'm still debugging my bar-build mechanism. OHLC parameters seem to be ok now, but volume parameter is not the same, compared to the historical data. It is greater or equal. Can you please tell me the update messages with which trade indicator (t,T,b,a,o - c part of 18th field of the update message) must influence the OHLC and\or volume parameter of the current 1-min bar?

Thanks in advance.

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: May 31, 2007 10:33 AM          Msg. 6 of 8
Only Trades ('T' for extended or 't' for normal) will attribute to volume.
OHLC is a slightly different beast to tackle. It all depends upon what you want in your data analisys. For example, since our servers currently do not store extended trades in history, they only use normal trades for building OHLC. But, if you want to include extended trades, you will want to include the extended trades as well.

dis
-Interested User-
Posts: 24
Joined: Apr 16, 2007


Posted: Jun 18, 2007 09:12 AM          Msg. 7 of 8
Hi Steve,

I have one more question. I'm receiving a lot of quotes (update messages). I'm collecting a set of them with the same Time (field 18 update message) to build a 1 minute bar. For example, a quote's time is 9:32. What time should I assign the 1 min bar to: 9:32 or 9:33? What's the way you store the historical data?

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Jun 18, 2007 09:16 AM          Msg. 8 of 8
IQFeed's history servers return data timestamped at the end of the interval

So, when requesting 1 minute history, all ticks from 09:00:00 - 09:00:59 will be accounted for in the bar 09:01:00.
 

 

Time: Sun May 26, 2024 7:25 PM CFBB v1.2.0 10 ms.
© AderSoftware 2002-2003