In this lesson we will walk through how to create a basket of orders for multiple instruments in the TWS BasketTrader and submit them. The TWS BasketTrader is a powerful tool that is useful when the user wants to submit multiple orders at one time and monitor the progress of those orders. BasketTrader can be accessed in both Classic TWS and Mosaic as well as being on a preconfigured page in the Layout Library.
To access BasketTrader from Mosaic click on the New Window Area in the top left corner, scroll down to the Other Tools section and highlight “More Advanced Tools” and choose BasketTrader. The BasketTrader will appear as a separate window. You can configure the settings and data column layout of the BasketTrader by clicking on the configure wrench icon in the top right-hand corner of the screen. Click on settings on the left-hand side to choose whether to:
- Instantly remove basket orders from pending page
- Show statistics for main and attached orders separately
- Ignore loading zero quantity orders
- And adjust the font size
Click on the BasketTrader layout section to choose which data columns to be shown in the BasketTrader.
In this case Financial Instrument, Bid, Ask, and Last are shown. You can add any of the columns in the Available Columns area by clicking on the plus sign to expand a bucket to view its contents, or type into the search bar. Let’s type Change and add Change % by highlighting it and clicking the “Add” button. Click Apply and OK.
The BasketTrader consists of five areas: At the top you can choose a file to upload to use as the basket. We will go into how to create basket files and upload them in the next lesson. Directly below is the Order Panel, followed by the Execute Basket buttons, Summary panel, and Trade log. You can create multiple baskets by clicking on the plus tab in the upper left-hand corner.
For this lesson we will manually create a basket. BasketTrader supports orders for multiple instruments and asset classes. In the Orders area click on a box in the Financial Instrument column and enter a symbol. We will type AAPL and select stock. You can select whether to round up to 100 shares or leave as an odd lot. We will choose to round up to 100 and click ok. We can edit the Action and Quantity by clicking on the Total Quantity, Time in Force, Order Type, and destination. For our next order we will enter a sell Limit order for 500 shares in ticker SPY. Type SPY in the box under AAPL, change the Action from buy to sell and click on the Total Quantity. Scroll down and select 500 shares. We can also adjust the price by clicking on the value in the Limit Price column, let’s select bid -200% of the spread.
Now we will enter an option order for IBKR. Type IBKR underneath SPY and select option, the option chain will appear. Select the expiration, the right, and the month. Once the option is selected it will appear in the order window. Close out the Option Chain and we will change this to a 10 lot and a market order. For our last order type in ES, scroll down to Futures and select December. Let’s change this to a Sell order, change the quantity to 5, and enter a limit price. You can add in as many orders as you like and export the file as a csv by clicking on File in the upper left-hand corner and Save basket as, name the file and pick the directory you’d like to save it in.
At the bottom of the Order section there are 5 buttons. Configure allows you to configure the Settings and Layout. Insert will insert a row into the Order area. Delete will Delete a row from the Order Area. Clear will clear out the order page. And reverse will change the Action from buy to sell or sell to buy. You can also convert all Limit orders to market if you like.
Underneath the Order section is the Execute Basket area in which, with a press of a single button you can Transmit the basket, pause the basket execution, cancel all outstanding orders in the basket, or cancel all outstanding orders and reverse the action. You can also transmit a percentage of the basket if you do not want to send 100% of the basket at once by changing the percentage. When ready to send the basket click submit and the Summary area will populate showing the progress of the Buy and Sell orders. You can see the progress in Orders, Contracts, and Dollar amount filled. The trade log below will show completed orders.
The TWS BasketTrader is a powerful tool that allows you to submit multiple orders at once in multiple instruments and asset classes. Please see the lesson on uploading and creating basket files for more information.
Disclosure: Interactive Brokers
The analysis in this material is provided for information only and is not and should not be construed as an offer to sell or the solicitation of an offer to buy any security. To the extent that this material discusses general market activity, industry or sector trends or other broad-based economic or political conditions, it should not be construed as research or investment advice. To the extent that it includes references to specific securities, commodities, currencies, or other instruments, those references do not constitute a recommendation by IBKR to buy, sell or hold such investments. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.
The views and opinions expressed herein are those of the author and do not necessarily reflect the views of Interactive Brokers, its affiliates, or its employees.