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
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
"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
"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
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"I'm satisfied with IQFeed. It's the most reliable and fastest quote feed I have ever used. Although I'm a resident in China, it's still very fast!" - Comment from Xiaofei
"Just a thank you for the very helpful and prompt assistance and services. You provided me with noticeably superior service in my setup compared to a couple of other options I had looked at." - Comment from John
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"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
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
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 »Request N intraday bars
Author Topic: Request N intraday bars (3 messages, Page 1 of 1)

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


Posted: Apr 16, 2007 08:08 AM          Msg. 1 of 3
Hello Support,

I have a few problems requesting N minute/intraday bars. As I can use only the RequestMinuteHistory(..) method, I need to calculate the number of days containing a required number of bars. I need price data for different periodicities (1min, 3min, 6 min and so on). I'm setting the constant value BarsInDay, for now its value is 50. Then I'm calculating NumberOfDays by the following formula: NumberOfDays = NumberOfBars / BarsInDay * Periodicity. However, it’s look like a bad solution as I'm getting some more or less bars now and then. Is there a better way for requesting N intraday/minute bars of different periodicity?

Your help in this regard would be appreciated

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


Posted: Apr 16, 2007 08:56 AM          Msg. 2 of 3
The servers only send you data bars for intervals that trade so there is no way of knowing how many data bars the servers are going to send unless you know this information previously.

If you are wanting to give your users an option of "show MSFT broken into 50 intraday bars per day", the only way I can think to do this accurately would be request tick data and build your own bars. Unfortunately this could lead to a tremendous amount of data and processing.

Every other option (that I can think of) would lead to inaccurate data.

JDonovan
-Interested User-
Posts: 24
Joined: Feb 11, 2007


Posted: Apr 17, 2007 08:07 AM          Msg. 3 of 3
Try this:

int NumDays=NumberOfBars /(int)(((double)MinutesInTradingDay/(double)Periodicity));
NumDays+=1;

Where MinutesInTradingDay = 390 (normal trading hours) and NumberOfBars is the max (or total) number of bars you want returned.

I think that's what you're looking for but not 100% certain based on the way the question was worded....

- Jeff
Edited by JDonovan on Apr 17, 2007 at 08:18 AM
 

 

Time: Sat May 18, 2024 12:20 PM CFBB v1.2.0 6 ms.
© AderSoftware 2002-2003