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)




"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
"Everything is working great with the API. I love it." - Comment from Calvin
"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.
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"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
"You have an excellent product !!!!!!" - Comment from Arely
"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
"Thank you so much - awesome feed, awesome service!" - Comment from Greg via Email
"I was on the phone with a friend who uses CQG and right after the Fed announcement, CQG was as much as 30 seconds behind DTN.IQ. Some quotes were off by as much as 15-18 cents. Your feed never missed a beat." - Comment from Roger
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 »IQFeed Developer »IQFeed Developer Support »How to create bar from tick data
Author Topic: How to create bar from tick data (3 messages, Page 1 of 1)

xvz
-Interested User-
Posts: 13
Joined: Mar 28, 2022


Posted: Jul 25, 2022 02:53 AM          Msg. 1 of 3
Hi,

I'm trying to create 1 minute bar from tick data.
I take tick data with "wAAPL" request.

My logic:
1min bar OPEN - I'll take from field Open, from the first tick at current minute
1min bar HIGH - I'll take from field High , from the tick with Max value at current minute
1min bar LOW - I'll take from field Low, from the tick with Min value at current minute
1min bar CLOSE - I'll take from field Close, from the last tick at current minute
1min bar VOLUME - I'll take from field Last Size, I just sum values from all ticks at current minute

Am I doing write? Maybe you can give me some advices? Or there any thing to optimize in my logic ?

And another question:
Why I can't get tick data on premarket session?
Edited by xvz on Jul 25, 2022 at 03:06 AM

DTN_Gary_Stephen
-DTN Guru-
Posts: 281
Joined: Jul 3, 2019


Posted: Jul 25, 2022 08:13 AM          Msg. 2 of 3
There's already a command that will build live bars for you: Streaming Intervals Bars (BW). Connect to port 9400 and send BW,Symbol,Interval in Seconds,Begin Date/Begin Time. This will give you history up to the current moment, then new incoming ticks as they happen. http://www.iqfeed.net/dev/api/docs//Derivatives_StreamingIntervalBars_TCPIP.cfm goes into more detail.

If you want to build them yourself, there are a few considerations:

1. IQFeed only uses Last-Eligible and Extended ticks to build bars, ignoring Other. The Message Contents field in each ticks will tell you which it is.
2. Volume willl not consistently match the sum of all ticks. This is because Volume can include transactions that aren't ticks, like stock options and implied trades.
3. Make sure you know the difference between "Last" "Most Recent" and "Extended":
- “Last” includes only last -eligible trades.
- “Most Recent” includes all trades.
- “Extended” includes on extended trades (also call Form T or after hours trades).

You would have to consider both "Last" and "Extended" data to re-create bars as IQFeed builds them.

4. You can get tick data on premarket session, but you must be watching the "Extended" fields. "Last" includes only last-eligible trades, which do not occur outside of regular trading hours. These distinctions apply to the fields listed in http://www.iqfeed.net/dev/api/docs/Level1UpdateSummaryMessage.cfm. You can view the one(s) you need.

I hope this is all helpful!

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

xvz
-Interested User-
Posts: 13
Joined: Mar 28, 2022


Posted: Jul 25, 2022 09:23 AM          Msg. 3 of 3
Quote: There's already a command that will build live bars for you: Streaming Intervals Bars (BW). Connect to port 9400 and send BW,Symbol,Interval in Seconds,Begin Date/Begin Time. This will give you history up to the current moment, then new incoming ticks as they happen. http://www.iqfeed.net/dev/api/docs//Derivatives_StreamingIntervalBars_TCPIP.cfm goes into more detail.


Thank a lot!!
This is like bomb for me!
I read all documentation , and from the naming I thought that is only for futures and others.
But now I khow, that I can use it for stocks , and it's really good new!
 

 

Time: Sat December 3, 2022 7:04 AM CFBB v1.2.0 0 ms.
© AderSoftware 2002-2003