IB ActiveX automated connect ?

Discussion in 'Automated Trading' started by jocli, Feb 27, 2002.

  1. jocli

    jocli

    I am trying to automate the start-up of the connection from my ActiveX Excel spreadsheet to TWS. I run the connect subroutine as in the ActiveX IB sample sheet. But then the TWS comes up with a dialog box asking "Accept incoming connection attempt ?". To this I have to answer manually.

    It there a way to connect without this dialog box appearing ?

    I want to be able to automate the trading when I am away from home and connect by VBA without manual intervention.

    Any ideas ???

    Jozef.
     
  2. eltr

    eltr

    I want to know the answer too.:cool:
     
  3. It's annoying, but I wonder if they put it there as a security measure.
     
  4. There is a way but it requires a bit of programming (just a bit). When your program makes the ActiveX request, its thread is blocked until the dialog box is pressed. The answer is to have your program start up another program or another thread that has one function: either send a mouse click or sendkeys (enter) to get rid of the dialog. So to summarize you will need either a new thread that will get rid of the ActiveX dialog or a new process to get rid of the dialog, but AFAIK (and I could be wrong) there is NO WAY for the calling thread to make the ActiveX request AND to click/sendkeys to the dialog because gets blocked.

    If you are using Excel you would need to create a standalone program in VB or some other language to click the dialog.

    I *guess* the dialog was intended as a security measure, however if you have a rogue program running on your system that can access the ActiveX dll or OCX, then why couldn't that rogue program also automate removing the dialog. I guess the intent was to make it so a webpage couldn't start trading your account for you, but that to me seems like the least likely scenario. To me it's just rinky dink.

    .02
     
  5. Use the DDE version After enable Excel integration has been selected no further input from the user is required. It works............for now.
     
  6. echo

    echo

    My guess is that DDE support is on the way out in favor of sockets/ActiveX. Actually, I hope they get rid of the DDE interface as I believe it is the only reason TWS can't be run on any other operating systems.
     
  7. Friday, March 15 the ActiveX interface could receive quotes but not place orders due to an upgrade to IB's browser version of TWS. The DDE version was working well. Gladly they have not killed off DDE yet.......................



    Q`