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)




"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"Very impressed with the quality of your feed - ******* is a real donkey in comparison." - Comment from A.C. via Email
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"Everything is working amazing now. I'm already impressed with the true-tick feed of IQFeed and it's ability to support my 480 symbol layout." - Comment from Tyler via Email
"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
"I've never had DTN go out on me since switching. ******* would go down a couple times every month when I was using them." - Comment from Bryce in AL.
"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
"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
"Thanks for all of your help. Great customer service deserves to be recognized which one the reasons I've been a customer of DTN for over 10 years!" - Comment from Stuart
"I am a hedge fund manager here. It’s funny, I have a Bloomberg terminal and a Bridge feed, but I still like having my DTN feed!" - Comment from Feras
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 June 15, 2024 6:59 PM CFBB v1.2.0 11 ms.
© AderSoftware 2002-2003