How can you trade multiple accounts on a single PC using IB's TWS?

Discussion in 'Automated Trading' started by a34567, Apr 4, 2007.

  1. a34567

    a34567

    I have a automated trading system based on Interactive Broker's
    TWS. It can trade one account on a PC. Now I want to trade mutiple accounts, how can I do that?

    Thanks
     
  2. Open an Advisor account. You login to it via TWS and it will trade all the accounts underneath it as one.
     
  3. FYI: If you want to run more than one TWS on one PC and interact via the API, then give both TWS different PORT numbers for incoming API connections.
     
  4. a34567

    which automatic trading software r u using now
     
  5. Regarding the TWS API.....would each sub-account need to be a separate "Client ID" to trade that sub-account separately ?
    Although "Client ID" is intrinsic to the API, it is hidden in the TWS front-end.
     
  6. still no reply

    .....................................
     
  7. a34567

    a34567

    Thank you for all the replies. I took TraderMojo's approach and run 4 TWS incetances on the same PC. It works great!

    I also installed Microsoft's virtual desktop, that really help me to organize programs for different accounts when all of them are running on the same PC.

    Right now I have 2 PCs trading a total of 8 accounts and another PC serves as active standby. Thanks to TraderMojo's suggestion, I don't need to run 10 PCs.

    And robinxing, sorry for the late reply. I was busy interviewing for a new job last week. I hope this will be my last job as my trading income is exceeding my salary as a .net programer.

    JS
     
  8. That's great, but for the benefit of the rest of us, could you tell us some specifics ...i.e. port numbers, client ids, etc in your set-up ?
    BTW: are you running your own Java or .NET app via the API ?
     
  9. a34567

    a34567

    I am running mutiple TWS instances from a single TWS installation. And I use 8XXX for each TWS instance. That is all I did to TWS. I did not change client ID, acctually, I don't know what is the client ID on my system.

    My auto-trade system was originally developed in java, but later changed to VB. The reason I switch to VB is because the fact that I can not implement the SSL at that time (Year 1999). But with VB, I can simply use the browser internet control. Now we should not have that problem because SSL library is vailable in JAVA. I use SSL to send order to other brokers like Datek, Freetrade, and later Ameritrade.

    I have been a programer in C, C++, Java, C# for 10 years but I have no plan to migrate my program from VB to other programming languages.

    This is the 5th year that my auto-trade system is operating. It performed OK: -8%, 31%, 56%, 77% for the past 4 years and 27% so far this year, trading S&P 500 e-mini.

    I am currently developing strategies to trade the red-hot chinese market.

    JS
     
  10. The fact that you know the advanced languages and STILL are reluctant to port that VB app to them is quite "telling"...i.e. VB was a very good rapid app development language whereas .NET and Java are not.

    Still, one thing puzzles me...if you are truly autotrading via the API, then you must know your ClientID as that is required when making a new connection via the API.
    (Or are you getting the signals from the VB app and placing the orders yourself via the TWS workstation ?)
     
    #10     Apr 24, 2007