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)




"Thank you so much - awesome feed, awesome service!" - Comment from Greg via Email
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"I started a trial a few weeks back before the market went wild. DTN.IQ didn’t miss anything and beat my other provider. I decided to stay with you because of the great service through all the volatility." - Comment from Mike
"I am enjoying the feed very much - so superior to the broker provided feed I was previously using." - Comment from George
"There is no doubt that IQFeed is the best data provider. I am very satisfied with your services. And IQFeed is the only one that I would recommend to my friends. Now, most of them are using your product in China." - Comment from Zhezhe
"You are much better than lawyers or the phone company because you answer the phone when I call! I just love your customer service." - Comment from Isreal
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"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'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
"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
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 »C# program crashes if there is more than one event for HistoryLookupClass
Author Topic: C# program crashes if there is more than one event for HistoryLookupClass (6 messages, Page 1 of 1)

jxz1995
-Interested User-
Posts: 24
Joined: Jan 9, 2006


Posted: Jan 9, 2006 03:34 PM          Msg. 1 of 6
1. I am using COM to get history data. I found if I add more than one event handler, my C# program crash. It will be fine for only one event handler. The following is the code

DTNHistoryDay = new DTNHISTORYLOOKUPLib.HistoryLookupClass();
DTNHistoryDay.DayCompleted +=new DTNHISTORYLOOKUPLib._IHistoryLookupEvents_DayCompletedEventHandler(DTNHistory_DayCompleted);
DTNHistoryDay.AbortedLoad +=new DTNHISTORYLOOKUPLib._IHistoryLookupEvents_AbortedLoadEventHandler(DTNHistoryDay_AbortedLoad);

Could you please let me know how I can work around it? I need to use the AbortedLoad to know the symbol is invalid or other errors.


2. Another question about request multiple symbols?

RequestDayHistory("MSFT", 300);
RequestDayHistory("INTC", 300);

if I request two symbols, in the event _DayCompleted, I can't tell the which data is for which symbol, my current work around is to Request one symbol and wait for the first finishes and request the sencond one. Please let me know my work around is the only way or if there are other better ways.

Thanks.

jxz1995
-Interested User-
Posts: 24
Joined: Jan 9, 2006


Posted: Jan 9, 2006 03:45 PM          Msg. 2 of 6
The version I am using is 4.1. The 4.0 has the same crash issue.

Thanks.

David
-DTN Evangelist-
Posts: 113
Joined: May 7, 2004

I'd rather be...


Posted: Jan 9, 2006 04:00 PM          Msg. 3 of 6
Quote: if I request two symbols, in the event _DayCompleted, I can't tell the which data is for which symbol, my current work around is to Request one symbol and wait for the first finishes and request the sencond one. Please let me know my work around is the only way or if there are other better ways.

If you request more than one symbol the return information is interleaved. There is no packet/message id to separate the response messages. Use tcp/ip and open separate connections to get data on more than one symbol at the same time. You have to trap for all error message conditions and timeouts - things are a lot better re error responses in the version 4.xx series.

GL!

David

IQXP Software
http://www.iqxp.com

LiveWire Update Service
PO Box 1417
Fairfield, IA 52556
641-472-8393
http://www.livewire-cablesoft.com/

jxz1995
-Interested User-
Posts: 24
Joined: Jan 9, 2006


Posted: Jan 9, 2006 04:14 PM          Msg. 4 of 6
David,

Thank you for the suggestion. I am using COM with C#. Does it mean that my workaround is the only to do it?

Thanks

Jim

David
-DTN Evangelist-
Posts: 113
Joined: May 7, 2004

I'd rather be...


Posted: Jan 9, 2006 04:38 PM          Msg. 5 of 6
FWIW: I gave up on com years ago but the DTN interface has progressed a lot. I suspect that the only solution if you stay with com is to wait for completion of the request before going on. But that is based on ignorance not actually having an implementation. I found the tcp/ip straight forward and finally with the cleaned up client reflected in version 4.xxx most errors are caught by DTN so time-outs are less frequent to non-existing. Unfortunately there is no way to clear or cancel the last request to the client so a non-response can be troublesome.

David

IQXP Software
http://www.iqxp.com

LiveWire Update Service
PO Box 1417
Fairfield, IA 52556
641-472-8393
http://www.livewire-cablesoft.com/

jxz1995
-Interested User-
Posts: 24
Joined: Jan 9, 2006


Posted: Jan 9, 2006 06:52 PM          Msg. 6 of 6
David,

Thank you for your suggestion. I will use TCP/IP instead of COM.

Jim
 

 

Time: Wed May 8, 2024 2:37 PM CFBB v1.2.0 11 ms.
© AderSoftware 2002-2003