Datafeed toolbox - IQFeed fails with a callback error?

Hi,
I have just started using MATLAB Datafeed toolbox to connect to IQFeed. My script is taken from examples in help.
c = iqf('REMOVED','REMOVED');
sec = 'IBM';
fromdate = now-0.05; % beginning of date range for intraday data
% (approximately one hour ago)
todate = now; % ending of date range for intraday data (current time today)
timeseries(c,sec,{fromdate,todate})
close(c);
However I get following error on execution.
Warning: Error occurred while executing delegate callback:
Message: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
Source: System
HelpLink:
I have tried with history and it gives the same error.
history(c,'GOOG',5)
Any help is appreciated.

 Risposta accettata

Possibly a path issue, give this a try. If it doesn't work, then call tech support:
restoredefaultpath
rehash toolboxcache

1 Commento

Thanks Sean,
I think path was the issue. It works now.
Btw, I raised with tech support later and here is the response. Thought it might be helpful for someone else.
=====
"I investigated on this and found that IQFeed is designed to work with applications that are "closed". For example, a UI that works with IQFeed will open the connection and leave it open until the UI is closed. The connection is never closed. Since, MATLAB allows dynamic interaction from the command line, you are able to attempt to open and close connections to IQFeed in the same session. This unfortunately leads to socket warnings in some cases.
To work around this issue ideally, you should avoid closing the IQFeed connection once it has been made from a MATLAB session."
=====

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by