Running multiple API spreadsheets simultaneously with TWS

Discussion in 'Automated Trading' started by tonyf, Feb 16, 2021.

  1. tonyf

    tonyf

    I am not a developer, just a mere excel power user.
    I find myself needing to run both of IB's ActiveX and DDE spreadsheets (standard API templates) simultaneously. The former to retrieve real-time margin requirements with the WhatIf function, the latter for Account Information, order entry, etc...

    Now things become really slow whenever I open 2 different instances of excel to run those 2 spreadsheets simultaneously. I am obliged t do so (I think) as we are not allowed to run multiple TWS sessions for the same account on different PCs.

    Is there any possibility of sorting this out with hardware? Can one have different CPUs running on a same computer, with an MS Excel session solely tapping into the resources of each CPU?
    My PC is quite old, but I have already upgraded the RAM to 16GB.
    Happy to look into any other suitable configuration to sort this out.
    Thank you.
     
  2. traider

    traider

    you can try to get both spreadsheets to connect to a single TWS
    They connect to the same socket each using a different client ID
    Upgrade to a more modern PC. You can get a 2nd hand machine that is a real workhorse cheap these days
     
    blueraincap likes this.
  3. tonyf

    tonyf

    You may be right, but I already get the 2 sheets to connect to the same TWS with the same client ID but using a different sockets.

    Do you think a computer upgrade would fix that?
     
    Last edited: Feb 16, 2021
  4. traider

    traider

    1. try easy stuff first, try changing tws virtual memory
    2. use ib gateway, Tws lags like crazy once u have other windows like charts or news open.
    3. upgrade hardware after trying above
    [​IMG]
     
  5. tonyf

    tonyf

    1)Virtual memory was set at 800 by default. now doubled.
    2) how do I used IB Gateway with the standard API spreadsheets? I have not needed to use it so far.

    Thanks again.
     
  6. traider

    traider

    you have to configure the sockets n ports in ib gateway, similar to what you did in TWS
    everything else is the same
    think of it as a version of TWS without the ugly graphics
     
  7. tonyf

    tonyf

    Can I run gateway and TWS (with ugly graphics :)) on 2 separate PCs, under the same credentials simultaneously?
    That will solve my problem....
     
  8. traider

    traider

    if using the same account I don't think so. You can try it but 1 login will likely force the logoff of the other.
    You can't even run demo and live on different PC because of live market data issue
     
  9. 2rosy

    2rosy

    no. there is one api socket used for tws
     
  10. Bad_Badness

    Bad_Badness

    Is there any possibility of sorting this out with hardware?

    Probably NO. Excel DDE, ActiveX etc are all pretty slow. You can try to reduce the overhead in the Excel by using the minimum, but that is probably where the bottle neck lies. Excel connections are best for where speed is not required.
     
    #10     Feb 16, 2021