Hello,

I am trying to call the TWX active object from AFL, and I am using
this kind of code:

twsIni="I15";
if (StaticVarGetText(twsIni)!="OK") {
tws3 = CreateStaticObject("TWS.TwsCtrl.1");
//tws2 = CreateStaticObject("TWS");

//tws = CreateStaticObject("C:\Jts\ActiveX\Tws.ocx");
tws3.connect("",7497,1);
StaticVarSetText(twsIni,"OK");}

tws3.reqCurrentTime();

(an adaptation from matlab trader)

but I get com errors
I think the object is created but is the not handled properly.
(I have two TWS running, and one has API configure with port=7497,but
the problem happens even with only one TWS, and the default port=7496
both in API configuration and the above code).
I have registered tws.ocx with regsvr32.

Did anybody try the same?Am I using the right object name?
In this way we could access from AFL marketscanners and Reuters
fundamental data, or simply use the full IB API functionality.

Thanks

Ly

Reply via email to