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 will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"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 just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
"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
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"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
"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
"I've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"The service is great, I see a noticeable improvement in my volume profiles over [broker]'s data feed" - Comment from Larry
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
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: Fri April 26, 2024 10:03 AM CFBB v1.2.0 8 ms.
© AderSoftware 2002-2003