Basket trading on IB TWS

Discussion in 'Order Execution' started by danjuma, Apr 3, 2017.

  1. danjuma

    danjuma

    Hello all. Is there a way to monitor the PnL total of a basket trade (in this instance a basket of spot forex pairs) on TWS and close the basket (in one go) when it hits my target or loss? Thank you
     
  2. tommcginnis

    tommcginnis

    Put the underlyings (your forex data lines) on a separate tab, right-click a "total-able" column and click on Show Total Row, and that set of totals will only be your self-segregated quotes. Bingo.
     
  3. danjuma

    danjuma

    Thanks for your reply. Though doesn't show the cumulative PnL of the whole basket, but I suppose I can work that out manually. I suppose there is no way to close the basket as a whole in one go (i.e. not having to close each trade individually)?
     
  4. tommcginnis

    tommcginnis

    There is no way for TWS to determine "cumulative" anything -- that will be something different for every account, and even then, may differ for individual accounts from one instant to the next.

    To close this "basket" as a whole:
    1) investigate BasketTrader
    2) load indidudual trades, pausing execution, and then Transmit All or Transmit Page as appropriate.

    This would be a fine time for you NOT to trade your live account, but to bring up your PAPER account, and make it work there, first. Everyone has to make a first trade (of whatever type) sometime, but you are swinging a large-caliber weapon around, announcing "I don't know how this works."
     
  5. moskvich

    moskvich

    I programmed something similar using TWS API. PM me if interested
     
  6. danjuma

    danjuma

    Thanks for the response. I have investigated BasketTrader, and indeed I have used it to transmit all the orders at once (paper trading of course), but alas there does not appear to be the facility/ability to close them all at once. Basically what I am trying to do is open a basket of FX pairs, if target or stop loss hit (as a basket) close all at once (as a basket).
     
  7. danjuma

    danjuma

    I will be most interested please. Just can't seem to be able to figure out how to PM you. Would it be the option that states 'start private read'?