IB ActiveX

Discussion in 'Interactive Brokers' started by rickty, Feb 8, 2002.

  1. dlincke

    dlincke

    That quote feed performance would suffer in an OCX implementation compared to DDE is something that was clear even before they released the OCX. COM adds lots of additional abstraction layers compared to DDE which is actually a very efficient window message based protocol. There is absolutely no reason to switch to the OCX if you just want quotes. (MS is pushing a new COM-based technology for streaming data delivery called RTD that is supposed to supercede the traditional DDE links into applications like Excel. However, this requires special COM interfaces to be implemented and is only supported starting with Excel XP).

    I believe the OCX is simply a wrapper around the socket API that IB released along with it. It probably uses a Windows timer that triggers once per second to check the socket for incoming data. I guess your best bet is to use the socket API directly which allows you to implement your own polling mechanism and approximate synchronization by polling e.g. every 1/10 second.

    But why not stick with DDE in the first place? From what I've seen so far, the OCX does not add anything that the DDE interface does not already provide. And DDE is fast, efficient and easily programmed from C++ as well as applications like Excel.

    The biggest gripe I have with the API is that ID management is not internalized within TWS and exposed through methods like GetNewID(). The current implementation renders the concurrent use of multiple applications that don't explicitly synchronize their use of IDs with each other impossible. I had hoped that this would change with the OCX and socket API, but I guess not.

    Dave
     
    #11     Feb 12, 2002
  2. klin

    klin

    I opened TwsActiveX.xls and clicked "connect", got error message from IB : "Can not accept connection request from host 127.0.0.1/127.0.0.1" and I clicked "ok", got error message in Excel "The TWS is out of date and must be upgraded".

    I'm running build 752.6, the TwsDDE.xls works fine. Any idea? Thanks.
     
    #12     Feb 12, 2002
  3. Funster

    Funster

    I just emailed ernie at help desk today with exactly this problem.

    I got reply:

    "I'm going to bring this issue to the development department and see what they add to clarify where the problem is with this.....I'll drop you a note when I hear back from them."

    I will post this board when I hear a solution.

    Until then the DDE link works. Some people, like me, though have to delete the following directory once a day to ensure that DDE works. Unfortunately that erases your TWS settings.

    C:\jts\diqfsdyr
     
    #13     Feb 12, 2002
  4. dlincke

    dlincke

    You're probably reusing old transaction IDs. TWS enforces the use of unique and ascending ID values even across sessions. To do this on every exit TWS stores the last used ID value in the DdeId= line in the user.ini file.
     
    #14     Feb 12, 2002
  5. alanm

    alanm

    That's kind of like replacing your whole house when a window is broken :)

    Insted of removing that directory and it's contents (and spending hours reconfiguring), while TWS is not up, edit the user.ini file within that directory that you mentioned. Search for the line:

    DdeId=xxxxxxxx

    and remove that line. The next time you start TWS, it will accept orders with any id.
     
    #15     Feb 12, 2002
  6. skerbitz

    skerbitz

    I just thought some of you might be interested ... I am using the ActiveX control in a PowerBuilder application and so far it seems to work fine. I am still in the testing stage but hope to go live with an automated trading system (ATS) by the end of this week.

    I originally designed the ATS to work with DDE, decided to make the switch to ActiveX because I could connect directly with TWS without going through excel.

    Unnecessary complexity makes me nervous :)

    M
     
    #16     Feb 12, 2002
  7. klin

    klin

    Hi,skerbitz

    What's your IB version? I got same error in twsActivex.xls and VB program using tws.ocx. What's your upgrade path of the IB? Thanks
     
    #17     Feb 13, 2002
  8. nitro

    nitro

    Why poll at all? It would be way better for TWS to implement a Model View Controller metaphor (Pattern for those that like that word.) This way, TWS just calls the function in all the Views that are registered with it every time an event occured (bid changed, last changed, etc.) This saves a heck of a lot of usless polling.

    I don't know much about DDE. I was able to get stuff working with VB (which I didn't know anything about either, but VB is really easy.) Would you be willing to share a trivial program that communicates with TWS in C/C++ that does simple things (quotes, orders, etc) ?

    I have not made up my mind if I dislike this. The freedom to implement it myself may become useful in the future. The best of both worlds would be to implement it in TWS, but allow the programmer to "Hook it." This way, you can just use a working default.

    nitro
     
    #18     Feb 13, 2002
  9. Funny you mention RTD ("Real Time Data"). I tried it when it was first available, and it is anything but what its name implies -- it only updates every few seconds. At least the sample programs. Crap.
     
    #19     Feb 13, 2002
  10. Hi Klin and others,

    Has anyone had a resolution to this problem? I still get this problem, and have tried installing and uninstalling to no avail. Also tried emailing help@..., also to no avail. (In fact, I didn't get any kind of response beyond the new auto-responder .)

    I am running Windows 2000, and also build 752.6. I think somebody else mentioned about this problem on their Win2k boxes.

    Has anyone had this problem under NT or 98?

    Has anyone on Win2K had the ActiveX work??

    Thanks everyone! :)
     
    #20     Feb 13, 2002