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 had always used ******* but for the past 2 weeks have been trying DTN IQFeed. Customer support has been extraordinary. They call just to make sure your problem hasn't recurred." - Comment from Public Forum
"I just wanted to tell you what a fine job you have been doing. While *******, from what I hear, has been down and out, off and on, IQ feed has held like a champ this week." - Comment from Shirin
"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
"You have an excellent product !!!!!!" - Comment from Arely
"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
"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
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"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
"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
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 »NEW IQFEED FORUMS »Data Questions »On the historical data, The Close Price are almost ALWAYS different from the next Open price
Author Topic: On the historical data, The Close Price are almost ALWAYS different from the next Open price (4 messages, Page 1 of 1)

ant1
-Interested User-
Posts: 2
Joined: Nov 5, 2019


Posted: Nov 5, 2019 09:55 AM          Msg. 1 of 4
I was under the assumption that Always, the close price equals the next opening price durg the opening trading day - with the expection of stock exchange closing vs stock exchange opening the next day.

For example, when I query any NASDAQ stock minute granularity historical data, I get improper values.

Statistically, 90% of the time, the close price is different from the next opening price.

I can also see that inconsistency in the Charts App from the IQFEed API Connection Manager, to reproduce, just open the Charts APP, take ABC Symbol, for example, load the minutes, display OHLC and click on each minute - and you will see the inconsistency by yourself.

Same Happens when doing a
HIT,Symbol,60,date from,date to,,,,1,Requestid
request to the API.

How can I get consistent open/close historical data with IQFeed?

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


Posted: Nov 5, 2019 11:06 AM          Msg. 2 of 4
The short answer is: that's an incorrect assumption.

The Close of a minute is not necessarily the Open of the next minute, even within the same day. Minute data is built from individual trade data within that minute. For example, the last transaction of the 10:00 minute can have a price $5.00, and the first transaction of the 10:01 minute can have a price of $5.01. That would give you a 10:00 Close of $5.00 and a 10:01 Open of $5.01. This is common.

In other words, IQFeed doesn't publish an Open based on the Close of the previous interval. An Open only occurs when a new transaction happens, and that new transaction may be at a different price level than the previous.

Sometimes the Open of a minute (or any interval) will match the Close of the previous one, but this is by circumstance only.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

ant1
-Interested User-
Posts: 2
Joined: Nov 5, 2019


Posted: Nov 5, 2019 05:44 PM          Msg. 3 of 4
Thanks Gary for the quick answer and pointing out that this asumption is wrong.

I am quite not sure to understand how, and I would greatly appreciate to get the long answer.

So what you are saying is that - purelly timely speaking - is that for example - if we have the following two minutes for Ask:

10:00 : Open $4.95, Close $5.00
10:01: Open $5.02, Close $5.05

The open time for the 10:01 is not exactly 10:01:00.000000 but between 10:01:00.0000 and 10:01:59.9999999, the first time the order book has changed during this time span, modifying the Ask price.

Or is it that the close price of $5.00 doesn't really happens at 10:00.59.99999 - it is the last change in value recorded between 10:00:00.00000 & 10:00:59.999999 - and that it happens that the price changes at exactly 10:01:00.000000 - giving a different Open value than the close value?

Or is it a bit of the both?

Xed43
-Interested User-
Posts: 1
Joined: May 16, 2020


Posted: May 16, 2020 10:28 PM          Msg. 4 of 4
Both...

The open price is the price of the first order in that timespan -- the time start/end are just aggregation limits for orders. Technically a bar doesn't have a price until the first order executes in that time window.

As only the orders matter, the time is just how we break up the order into buckets. So there is no price at "10:01:00.000000" unless an order executed at "10:01:00.000000". If the first order after the clock strikes "10:01:00.000000" happens at "10:01:02.473829" that is the open price for the bar we lump the orders from 10:01:00.0000 and 10:01:59.9999999 together for and call "10:01".

Same for the close price -- its the last order in the time period. It can happen at any time within the time window, and might come before "10:00.59.99999".

Order #1 @ "10:00.58.435321": $5.00
Order #2 @ "10:01:02.473829": $5.02

...gives you...

10:00: Close $5.00
10:01: Open $5.02

Open and close prices are only ever the same if those two sequenced orders on either side of a time threshold happen to execute for the same price.

In other words, bars don't exist. Only orders exist.
 

 

Time: Wed May 1, 2024 1:20 PM CFBB v1.2.0 13 ms.
© AderSoftware 2002-2003