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 was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"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
"Thank you so much - awesome feed, awesome service!" - Comment from Greg via Email
"Just a quick one to say I'm very impressed so far :) The documentation for developers is excellent and I've quickly managed to get an app written to do historical downloads. The system is very robust and pretty quick considering the extent of data that's available. The support guys have been very helpful too, in combination with the forums it's been plain sailing so far!" - Comment from Adam
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"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.
"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
"DTN has never given me problems. It is incredibly stable. In fact I've occasionally lost the data feed from Interactive Brokers, but still been able to trade because I'm getting good data from DTN." - Comment from Leighton
"I like you guys better than *******...much more stable and a whole lot fewer issues." - Comment from Philip
"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
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: Sat May 18, 2024 3:44 PM CFBB v1.2.0 7 ms.
© AderSoftware 2002-2003