Interactive Brokers
Available asset-classes: CFD's, Future, Forex, Index, Stock

Brief overview of Interactive Brokers (IB)

Interactive Brokers is a well-known company that has provided financial services as a broker and dealer since 1977. Essentially, IB specializes in intraday and institutional trading. The company developed its own trading platform - Trading Work Station (TWS) - and offers traders very advantageous commission and margin.
Supported asset classes: CFD's, Future, Forex, Index, Stock
Supported orders:
OCO order connections are supported by this broker ORO order connections are locally simulated IFDone order connections are locally simulated
Order execution TradersYard X does not execute any orders! Instead, brokers simply inform us of filled orders and execution price. If data received from your data feed provider does not match the quotes on the brokerage platform for an instrument, then the entry and exit price will not be displayed properly on your chart.
You can open a real or demo account at Interactive Brokers.
Supported Account Types by TradersYard X
  • Standard Single Account (One Login and one connected main account)
  • Financial Advisor (FA) Accounts (One Login with a main account and several sub-accounts), find more details HERE
  • Family and Friends (F) Accounts (One Login with a main account and several sub-accounts), find more details HERE
Not supported Account Types by TradersYard X
  • Duplicated Accounts (One Login and several connected main accounts)
(This Account Type is not supported and can lead to problems with order executions and data synchronization between TWS and TradersYard X. Please contact your IB Account-Manager to change your Account to one of the above-mentioned supported Account Types.)

Connecting

Please follow the instructions in the following video to establish the connection correctly:

Essential information

Message "The registration key for 'Trader Workstation' could not be found" This message appears if the API settings have not been set for TWS according to the Connection Guide (see table above). Additional information about brokers can be found on our website.
Also, make sure that the file tws.exe is installed in the main directory "Jts". If a subdirectory was created then this file with all the other files must be moved to the main directory. Only then TradersYard X can autostart the TWS.

Port settings

Port settings in TWS and TradersYard X must be synchronized if connection issues are experienced. That means, ports need to have the same number
Please use the following ports: 7497 - Demo account 7496 - Live account
For details please download IB Host and Ports Documentation file.

Automated Reconnection

TradersYard X has an implemented logic that automatically reconnects if the connection was lost without means. If you use a VPS server and the Windows Remote Desktop software this logic can have problems because when the Windows Remote Desktop was closed all the Windows function for starting programs are locked and the reconnection process cannot be established. Please use other Remote Software tools like Teamviewer or Anydesk.

Client ID

In some cases user can get a notification:
It means ClientID in TX and TWS differs. ClientID must be synchronous between TX and TWS, as otherwise the information is not transmitted correctly to the TX. To avoid this User should synchronize the ClientIDs because of the two attachments, or set them to 0 in TX and delete them in the TWS.

IB as a data feed

Historical Request Overflow

The maximum number of simultaneous open historical data requests from the API is 50. So you should take care that you have a much smaller number of requests pending at a time.
Pacing Violations for Small Bars (30 secs or less) A Pacing Violation occurs whenever you do not observe one or more of the following restriction: -> Making identical historical data requests within 15 seconds. -> Making six or more historical data requests for the same Contract, Exchange, and Tick Type within two seconds. -> Making more than 60 requests within any ten-minute period.
However, be careful when requesting large amounts of historical data or sending historical data requests as "soft limit' is still implemented. If you request too much historical data you will get disconnected from the API client. You can find further information about the pacing violations for small bars in this IB article. Please note:
1 instrument in 3 timeframes = 3 histories 1 Analyzer Escort column = 1 history Watch lists, backtest lists, indicators, and alerts also require histories.

Limitation

For each bar, size TradersYard X provides historical data for a limited period of time.
Please see the table below:
Bar Size
Time Period
1 - 4 sec bars
30 min back
5 - 9 sec bars
1 h back
10 -29 sec bars
4 h back
30 - 59 sec
8 h back
1 min
1 day back
2 min
2 days back
3 - 29 min
1 week back
30 m - 1439 min
1 month back
1-23 h
1 month back
EoD (1 Day)
1 year back

Futures Contracts

The IB API does not support Continuous Contracts. This means that TradersYard X can only show one Contract e.g. FrontMonth. In order to compare the data in TWS with TradersYard X please do not use Continuous Contracts.

Supported Time Zones

Time Zone
Description
GMT
Greenwich Mean Time
EST
Eastern Standard Time
MST
Mountain Standard Time
PST
Pacific Standard Time
AST
Atlantic Standard Time
JST
Japan Standard Time
AET
Australian Standard Time
Please download the API Reference Guide.pdf file. Time zones section in Chapter 9, page 571

Delayed data

Delayed data cannot be transferred to your computer via the current IB-API. If delayed data is delivered to you, TradersYard X will not be able to display charts.

Differently displayed charts in TradersYard X and the TWS

We do not receive the tick data through the current IB-API. As a result, some ticks may be assigned to the previous or the subsequent bar. This applies especially to computers with an incorrect system time. TradersYard X attempts to solve this problem via system time synchronization.

Multi-Accounts

Multi accounts are not supported by TX. During connection user would get a warning message in the log: "Your account type: Multi Accounts is not supported. The connection is possible but we noticed minor problems."

Fees included in the price

Interactive Brokers includes fees in the price of an entry order, which is displayed on the chart as follows: entry price = order price + commission. Displayed within short time frames and small positions, this entry price may be confusing. However, TradersYard X is unable to separate commissions from the order price, since we receive pre-assembled data via the API.
We plan to fix this problem by allowing traders to manually enter the exact numbers from your broker in the Profit & Loss, Commissions, and other columns. This functionality will be implemented in one of the upcoming TradersYard X versions.
Please refer to your broker if you wish to know the exact sum of the profits, losses, or commissions.

Profit & Loss: differences between TradersYard X and TWS

TradersYard X and TWS calculate PL in different ways. So results may differ: Please see the currency conversions section for more information.
If the user would have quotes in pennies or USD cents in TX it would be shown in GBP or USD (100x more).
Instruments with such quotes:
CT Cotton GF Feeder Cattle Futures HE Lean Hog Futures LE Live Cattle ZL Soybean Oil Futures ZO Oat Futures ZR Rough Rice Futures ZS Soybean Futures ZW Wheat Futures XK MINI SIZED SOYBEAN FUTURES CT.I Cotton No. 2 DPW.L DP WORLD LIMITED ORD USD2 (DI) ZC Corn Futures

Error messages from Interactive Brokers

Please contact the IB support team to clarify. Note: The error messages received from Interactive Brokers are not errors in the ordinary sense, but simply IB internal codes that serve informational purposes only. You can find an interpretation of all Interactive Brokers codes here.
110 - The price does not conform to the minimum price variation for this contract. TradersYard X solution: adjust tick size to tick size set in TWS
200 - No security definition has been found for the request. TradersYard X solution: import of mappings or manually adding the correct mapping in Instrument Escort.
Order size exceeds leveraged FX-Position. TradersYard X solution: decrease order size or increase account size
Important! If the user trades an instrument that can be executed on the different exchanges, he will get the specific message in the log. For example, if the user places an order BMW.FF (Frankfurt exchange)and this order is executed on BMW.DE (Xetra exchange) user will get following message in log:
"Your orders to BMW.FF are resolved to primary exchange which is located on different instrument - BMW.DE"

Adjusting the tick size for CFDs according to the current price

Please note that Interactive Brokers uses different tick size parameters according to the particular price range. When trading some European CFDs, it may occur that users receive the following error messages: 1. "The price does not conform to the minimum price variation for the contract". 2. "Instrument Tick-Size is not yet calculated or delivered". In order to continue the trade, it is necessary to adjust the tick size for the instrument manually.
Please enter a ticker name in the search field on IB's website and check the price parameters for the selected instrument.
Then enter the tick size in the Instruments window according to the current price, and check the checkbox Pin Tick Size as shown in the figure below:

Gateway

Please find a connection-guide for IB-Gateway HERE

Financial adviser account from Interactive Brokers

Please find a connection-guide for IB-FA Accounts HERE

Assigning instruments and orders with Interactive Brokers

"Resolve position instrument" popup or "Resolve instruments for orders" popup
From time to time it may occur that orders with Interactive Brokers cannot be assigned to the appropriate TradersYard X instrument. The reason for this is that Interactive Brokers uses the same symbol name for different instruments. For example, the stock with the Interactive Brokers symbol „AAPL“ is listed on the NASDAQ as well as on the XETRA exchange. TradersYard X uses the name "AAPL" for the NASDAQ instrument and the name "AAPL.DE" for the XETRA instrument.
Depending upon which exchange you are trading with, it may become necessary to manually assign an order to the correct TradersYard X instrument. Although TradersYard X has integrated a process that assures that symbols are correctly accounted for, it does not work if an order is entered directly in the TWS.
Should this happen, the "Resolve position instrument" popup will appear, instructing you to assign the correct instrument in TradersYard X for the Interactive Brokers order.
Using the example of the AAPL stock:
  • shares traded with NASDAQ are assigned to the TradersYard X instrument "AAPL", and
  • shares traded with XETRA are assigned to the TradersYard X instrument "APC.DE".
Symbol entry in the TWS (example: AAPL)

TradersYard X++ (plusplus) Resolve Setup

This is one of the essential tools in TX++.
TradersYard X++ (plus plus) resolve setup works in the following manner:
  • If you have submitted and confirmed orders, TradersYard X++ strategies will continue to run even when the trading platform is closed.
  • These strategies will be saved within the system.
  • When you start TradersYard X up again, the strategies will be adjusted to the current market conditions.
If you plan to keep an intraday trade with the TX++ setup overnight, we recommend that you do not turn off TradersYard X since this can lead to unexpected order behavior. For example, order groups managed by TradersYard X, such as IfDone and OCO, are often not linked to your broker due to the fact that the majority of brokers do not support these special types of orders. Only having TX opened ensures that all setups and functionalities will remain unchangeable.
If something happens during the time in which TradersYard X is closed (e.g. filled or canceled orders, closed trades, etc.), stops will be recalculated and positions/setups will be adjusted, etc. Obviously, this can be dangerous.
Should this occur, you will receive a recovery popup (see image below) displaying the trades which require your intervention and supervision:
Functions of the buttons in the recovery popup:
  • The Entry Escort button allows you to enter the strategy. NOTE: the Trades tab will display the entry reason.
  • The button Session allows the user to select analyzer session
  • The Confirm button applies the suggested actions.
  • Chart area provides you access to all chart functions. Details on section Chart Toolbar
If you close the popup without confirmation, you will have to clear the trades manually.
Important!
For some Symbols, TWS doesn't allow to place limit order outside trading hours

Important Note

THE BROKER'S PLATFORM ALWAYS REPRESENTS THE REFERENCE PLATFORM.
This means that the orders and market-related values shown on the BROKER platform are valid. The broker's platform should always be active as a backup to TradersYard X. This gives you an essential overview of the interaction between TradersYard X and your broker. Furthermore, you will always know exactly how your orders/positions and ultimately your account balance is displayed.