Interactive Brokers Trading Service

Interactive Brokers Logo

Introduction

Sierra Chart works with the Interactive Brokers (Interactive Brokers) trading service. This service provides the Sierra Chart software with historical Daily and historical Intraday data, streaming real-time data, and complete trading services for all types of markets around the world.

The Sierra Chart trading interface fully supports trading with Interactive Brokers. To use Interactive Brokers with Sierra Chart, follow the Setup Instructions below.

We only recommend the use of Interactive Brokers for experienced traders, those who are technically competent with computers and software, and understand the source of technical problems. The large length of this page confirms the complexity and issues that you will face when using Interactive Brokers. Interactive Brokers does provide many advantages and can be a good choice for many traders, but it is important that you are aware of potential problems and are willing to accept the consequence of them.

Even though you may see a particular problem in Sierra Chart when using Interactive Brokers and possibly do not see it in another program, still means the problem is on the Interactive Brokers side. The reason has to do with differences in the way that Sierra Chart may interact with the API and it may be encountering particular problems with TWS or Interactive Brokers which the other programs may not be encountering because the interaction could be different. Sierra Chart will interact with TWS in the most reliable and redundant way.

Support policy: Support from Sierra Chart for technical issues encountered when using Interactive Brokers, is within the discretion of Sierra Chart. There are some complex technical issues that a user may encounter when using Interactive Brokers, that can have various causes which are on the side of Interactive Brokers and therefore are outside of the control of Sierra Chart. Therefore these will be hard for us to understand and assist with because they are not within Sierra Chart and the Interactive Brokers system is a highly complex system with many reasons why things can go wrong. Therefore, we will not hesitate to decline support for some issues reported to us involving Interactive Brokers. Be aware of this when making a decision as to whether you should be using Interactive Brokers. What we want to avoid is where you waste a significant amount of your own time because of Interactive Brokers issues and our time gets wasted as well and then you end up giving up. So consider this carefully.

From our perspective Interactive Brokers is an unnecessary burden to Sierra Chart support. If you plan to use Sierra Chart with Interactive Brokers consider instead using another supported Trading service if that is reasonable for you. Interactive Brokers needs to adopt the DTC Protocol and implement it 100 percent according to the specifications.

When using Sierra Chart for the first time you should not judge the performance of Sierra Chart using Interactive Brokers since it provides a substandard market data system. When evaluating the charting performance of Sierra Chart both historically and in real-time we recommend using the Sierra Chart Real Time and Historical Forex and CFD Data Service which is provided with all Service Packages.

This may not be the best introduction for a Trading service, but it is absolutely necessary all of this is communicated upfront.

What is Included

  • Streaming Real-Time Data: Yes.
  • Historical Intraday Data: Yes. Limited amount from Interactive Brokers. When using Sierra Chart Service Package 3 or higher and Global Settings >> Data/Trade Service Settings >> Allow Support for Sierra Chart Data Feeds is enabled, the Sierra Chart Historical Data Service is used for major futures contract symbols and US stock symbols, providing 2 to 3 years of historical Intraday data. The data from the Sierra Chart Historical Data Service is 10-15 minutes delayed. The most recent 10 to 15 minutes will still be downloaded from Interactive Brokers.
  • Historical Daily Data: Yes. 1 year if from Interactive Brokers. When using Sierra Chart Service Package 3 or higher, Historical Daily data for major futures contract, cash index and US stock symbols is provided by the Sierra Chart Historical Data service. In this case 10+ years are available.
  • Historical BidVolume and AskVolume: No from Interactive Brokers. Yes when the Sierra Chart Historical Data Service is used. See above.
  • Live Trading Services: Yes.
  • Simulated Trading: Yes.
  • Order Types Supported: All.
  • Server Managed OCO (Order Cancels Order): Yes when Global Settings >> General Trade Settings >> Use Server Side OCO and Bracket Orders is enabled (applies to 1166 and higher).
  • Server Managed Bracket Orders: Yes.
  • Automated Trading (applies to Live or Simulated): Yes.
  • Supports Negative Offset for Stop-Limit Orders: Yes.

Amount of Historical Data Available: Interactive Brokers provides 1 year of Historical Daily and 1 year of historical Intraday data. Sierra Chart will always download the full 1 year of Historical Daily data for Historical charts. For Intraday charts, it is not very practical to download 1 year of historical Intraday data all at once from Interactive Brokers. Normally the download will fail and it will take a very long before it completes. Downloading 30 days is more practical. The instructions below explain how to specify the number of historical Intraday days to download.

Setup Instructions

If you are having a problem connecting to the Interactive Brokers Trading service, then be sure to follow through all of the steps below.

  1. To use the Interactive Brokers trading service, you need an account with Interactive Brokers. Go to the Interactive Brokers website and open an account with them if you do not already have one.

    It is possible to use an Interactive Brokers demo account and log into TWS with the username edemo and password demouser. This should only be used for test purposes though.
  2. Run the Interactive Brokers Trader Workstation (TWS) software. It is highly recommended that you use the stand alone TWS software. Not the browser based TWS.
  3. Select Edit >> Global Configuration on the Interactive Brokers TWS software menu.
  4. Go to API >> Settings.
  5. Enable the Enable ActiveX and Socket Clients option.
  6. Set the Socket Port to 7496.
  7. Disable the Read-only API option.
  8. Make sure the Component Exchange Separator setting is set to a /.
  9. Add a Trusted IP Address for 127.0.0.1.
    Interactive Brokers TWS Settings
  10. Go to API >> Precautions in the TWS Configuration window.
  11. It is essential that you enable Bypass Order Precautions for API Orders.
  12. Press OK to save the Interactive Brokers API settings.
  13. Go to Sierra Chart. Select Global Settings >> Data/Trade Service Settings on the menu.
    Data Trade Service Settings Menu
  14. Click on the Service list box arrow. Select Interactive Brokers from the list. If you do not see the service in the list box, then refer to this help topic.
    Interactive Brokers Service Settings Window
  15. Click on the Server list box arrow in the Connection Details frame. Select the localhost:7496 server name from the list. If the TWS software is running on a computer different than Sierra Chart, then the Server can be set to the IP address where TWS is running.
  16. Enable the Connect On Program Startup option. Enable the Reconnect On Failure option. Optionally enter your Interactive Brokers username and password in the Username and Password boxes. By entering your Interactive Brokers username and password, this enables Sierra Chart to log you into the standalone TWS automatically at the TWS New Login window. Refer to the Automatically Logging Into TWS section.
  17. For the downloading of historical data to work correctly, your computer's Date and Time need to be set correctly. The last Date and Time in the chart also needs to be correct for that bar. Otherwise, some or all of the data received from Interactive Brokers may be filtered out.

    If you have problems with historical data, like pacing violations, refer to Interactive Brokers Historical Data Issues and Solutions.
  18. Multiple Concurrent Connections to TWS: To have multiple copies of Sierra Chart connected to Interactive Brokers Trader Workstation (TWS), then each copy of Sierra Chart needs to be set to a different Instance Client ID number, set with the Instance Client ID setting in the Connection Details section in the Global Settings >> Data/Trade Service Settings window. You can use any of the listed Instance Client ID numbers. It does not matter. You only need to be certain that each copy of Sierra Chart uses a different Instance Client ID number.

    This Instance Client ID number is given to TWS when Sierra Chart connects to TWS.

    Accessing All Trade Orders from TWS: If you want to have access to all trade orders entered from TWS as well as orders entered from Sierra Chart, then you will need to set the Instance Client ID setting to 0.

  19. Set the Time Zone setting to the time zone that you want times displayed in.
  20. Set the Intraday Data Storage Time Unit to what you require.
  21. Set the Data and Other Settings >> Default Currency Code to the currency code that will be specified with stock symbols when a currency code or exchange is not part of the symbol.
  22. Press OK to close the Data/Trade Service Settings window.
  23. Uncheck the Global Settings >> General Trade Settings >> Use Server Side OCO and Bracket Orders (applies to Sierra Chart version 1166 and higher) option if you want to have Sierra Chart provide the OCO bracket order functionality rather than relying upon what Interactive Brokers provides. In earlier versions of Sierra Chart, this option is located in Global Settings >> Data/Trade Service Settings.

    The Interactive Brokers provided bracket order functionality may not work well. Therefore, we recommend keeping this option unchecked.

    However, for the ultimate safety, you may want to check this option and rely on the Interactive Brokers functionality because if you lose connectivity to Interactive Brokers, then Sierra Chart cannot properly manage OCO orders.
  24. Make sure TWS is running. To connect to the data and trading server, select File >> Connect to Data Feed on the menu.
  25. If the Window >> Message Log window opens and displays messages indicating there was an error connecting to TWS, then perform the following steps:
    1. Select File >> Disconnect to prevent further connection attempts.
    2. Restart TWS (Interactive Brokers Trader Workstation) and make certain TWS is running. It should be running on the same computer where Sierra Chart is installed to.
    3. Carefully review the setup steps above again to be certain all of the settings are correct. The most important steps to follow are 2 through 17 above.
    4. Make sure the Global Settings >> Data/Trade Service Settings >> Server in Sierra Chart is set to localhost:[port number]. The port number can be any port number and further information about this is below.
    5. Be sure to follow the step above to add a Trusted IP Address in the TWS API settings (step 7).
    6. Disable any firewall software you are running. The built-in operating system firewall can be kept enabled, but you may want to try disabling it as well or make sure it is not blocking TWS or the specified Socket Port.
    7. If one of the messages in the Message Log says Failed to connect to the data and trade server. Winsock error: (10061) No connection could be made because the target machine actively refused it., then try using a different socket port. To change the socket port, select Global Settings >> Data/Trade Service Settings. In the Server box enter localhost:7497 (you can use any number). In Interactive Brokers TWS, select Edit >> Global Configuration >> API >> Settings >> Socket Port and enter 7497 (use the same number you have set in Sierra Chart).
    8. Remove your TWS Username and Password in Global Settings >> Data/Trade Service Settings to prevent Sierra Chart from automatically acknowledging any connection related dialog windows.
    9. Try connecting to the Data and Trading server again in Sierra Chart by selecting File >> Connect to Data Feed on the menu.
  26. If there still is an error connecting, then review help topic 1.5.
  27. To open a Historical Chart, an Intraday Chart or a Trading DOM, select File >> Find Symbol on the menu. Locate the symbol in the lists and press the appropriate button.

    If you do not see the symbol listed that you want to use, refer to the Interactive Brokers Symbols page to determine the proper symbol format and manually type the properly formatted symbol into the Selected Symbol box on the Find Symbol window and then open a chart or Trade DOM.

    You can also yourself add symbols which will be listed in the Find Symbol window, through the Global Symbol Settings.
  28. Symbol Limits: Interactive Brokers may limit the number of symbols you can receive data on at the same time. This limit may be increased based on your trading volume. If you try to get Charts or Quotes lines for more than the allowed symbols, then those Charts or Quote lines will not update. You can tell how many symbols Sierra Chart is currently tracking by looking at the number after ST= in the right most status box below the Sierra Chart menu. Once you exceed the limit you need to do two things to get updates on the symbols that go over the limit. Reduce the number of Charts open and the number of Quote lines you are using on a Quote Board or Spreadsheet to below allowed number of symbols, and then reconnect to the data and trade server by selecting File >> Disconnect on the menu and File >> Connect to Data Feed on the menu.
  29. Historical Order Fills: Upon a connection to the Interactive Brokers Trader Workstation, Sierra Chart will request 10 days of historical order fills for all of the accounts available on the logged in instance of Trader Workstation. This is to insert any missing order fills into the Sierra Chart Trade Activity Log for trade reporting. However, you may not receive 10 days of historical order fills upon the connection. If you do not, then open the Trade Log in Trader Workstation (TWS) and while the Trade Log is displayed, reconnect to TWS from Sierra Chart by selecting Disconnect and Connect to Data Feed on the File menu.

    To receive historical order fills, you also need to have Global Settings >> Data/Trade Service Settings >> Data and Other Settings >> Download Historical Order Fills on Connectset to True.
  30. Continue with step number 3 on the Getting Started documentation page.

Market Data Not Subscribed Through Interactive Brokers

In order to receive market data for charts and quote lines within Sierra Chart, it is necessary you are subscribed to the exchange that the Symbol is listed on. If market data is not subscribed, you will see error messages similar to the following in the Sierra Chart Message Log and you will not receive historical and/or real-time data for the symbol:

Message from Interactive Brokers: Requested market data is not subscribed.Error&DTB/IND/Top&DTB/IND/Top. Interactive Brokers Error Code: 354. Request ID: 1. Symbol: DAX-I-DTB.
Message from Interactive Brokers: Requested market data is not subscribed.YM SEP'15/TOP/ALL. Interactive Brokers Error Code: 354. Request ID: 1. Symbol: YM-201509-ECBOT.
HD Request # 2 | Message from Interactive Brokers: Historical Market Data Service error message:No market data permissions for DTB IND. Interactive Brokers Error Code: 162. Request ID: 2.
HD Request # 3 | Message from Interactive Brokers: Historical Market Data Service error message:No market data permissions for NASDAQ IND. Interactive Brokers Error Code: 162. Request ID: 27.
HD Request # 3 | Message from Interactive Brokers: Requested market data is not subscribed. Interactive Brokers Error Code: 354. Request ID: 28.
Message from Interactive Brokers: Invalid Real-time Query:No market data permissions for GLOBEX FUT. Interactive Brokers Error Code: 420.

In this case you will need to contact Interactive Brokers and subscribe to market data from the particular exchanges mentioned in these messages.

After this is done, restart Trader Workstation. Sierra Chart will establish a new connection and you should then receive market data.

Interactive Brokers Market Data Problems

There are a wide array of issues you can potentially have with Interactive Brokers market data. They are as follows:

  1. Missing historical data (moderately common)
  2. Slow historical data downloading (common)
  3. Real-time data not updating (uncommon)
  4. Incomplete price and volume data ( Very common and routine. In other words normal.)
  5. Confusing and complex symbology which can change from time to time (moderately common)
  6. No real-time data (uncommon)

In many cases most of these issues are solved by using the Sierra Chart Exchange Data Feed which integrates with Interactive Brokers trading services.

Automatically Logging Into TWS

When the Interactive Brokers Trader Workstation software is started and the TWS Login window is displayed, Sierra Chart can enter your TWS Username and Password into the TWS Login window and automatically log into TWS when connecting to the data feed in Sierra Chart.

Follow the instructions below.

  1. Select Global Settings >> Data/Trade Service Settings on the menu.
  2. Enter your Interactive Brokers Username and Password in the Username and Password fields for Interactive Brokers.
  3. Enable the Reconnect on Failure option.
  4. If you do not want to use this feature or have difficulty with it, then clear your Interactive Brokers Username and Password in the Data/Trade Service Settings window.
  5. Press OK.
  6. Start the Interactive Brokers TWS software. The Interactive Brokers TWS Login window will display. What we have found in the newer versions of this login window is that you may need to click in the User Name box to give it the focus in order for the automatic login process to work properly.
  7. To automatically login to TWS when the TWS Login window is displayed, go to Sierra Chart and select File >> Connect to Data Feed on the menu.
  8. You may need to switch back to the TWS Login window. Do not switch to another program on your desktop while waiting for the automatic login.
  9. If Sierra Chart is waiting to reconnect to the data feed ( Waiting to Reconnect is shown in the status window below the Sierra Chart menu), it will also log you into TWS. Keep in mind that when Sierra Chart is waiting to reconnect, the login may not occur right away. To force an immediate connection in this case, select File >> Connect to Data Feed from within Sierra Chart.
  10. To automate the process to start both the Sierra Chart software and the Interactive Brokers TWS software by using a single shortcut, then you will need to create an operating system command line batch file. This batch file needs to start Trader Workstation (TWS). To find the specific command line to use, go to the existing icon that you use the start TWS. Right-click on it and select Properties. Look at the "Target". That is going to be the command line that you need to use in the batch file. You also need to add another line in the batch file to start Sierra Chart.
  11. If there any difficulties with this feature, then it is outside the scope of our support to help with it. Do not use it in that case.
Interactive Brokers TWS Login Window

Running Multiple TWS Instances

This section is relevant if you want to run multiple TWS instances when you have two or more Interactive Brokers accounts that you wish to use at the same time. If you simply want to connect multiple copies of Sierra Chart to a single TWS instance, then you only need to configure each copy of Sierra Chart to work with Interactive Brokers and connect them to the single copy of TWS that is running. In this case, follow the Setup Instructions above for each copy of Sierra Chart.

It is possible to use multiple TWS (Interactive Brokers Trader Workstation) instances and have multiple copies of Sierra Chart using those instances. For example, you can have two instances of TWS running and have two copies of Sierra Chart also running where one is connected to one instance and the other one to the other instance.

The way this is accomplished is by using different port numbers for each TWS instance. Select Edit >> Global Configuration >> API >> Settings from the Interactive Brokers TWS software menu. Set a different Port number for each TWS instance. You need to use the same Port number in the Sierra Chart copy that will be connected to that instance. To set the port number in Sierra Chart, select Global Settings >> Data/Trade Service Settings. In the Server box change the number after the colon ":". This is the port number. Example: localhost:7494

Market Depth

There are several features in Sierra Chart which require market depth data. These include the chart DOM, when it has the Bid Size and Ask Size columns (Global Settings >> Customize Trade DOM/Chart DOM Columns), the Trade >> Draw DOM Graph On Chartfeature, and other features. When using any of these features that require market depth, the market depth updates will be automatically started for the symbol of the chart.

Keep in mind that you can only receive market depth for up to 3 symbols from Interactive Brokers at a time. This is an Interactive Brokers limitation. If you exceed this limitation, you will not get market depth beyond the best Bid and Ask on the additional symbols. So you need to make certain that you are not using Market Depth features on more than 3 symbols at a time.

After you reduce the use of market depth features to 3 charts or less, then reconnect to the data feed with File >> Disconnect and File >> Connect to Data Feed.

Market Depth Data Issues

If you experience out of order price levels, or missing price levels in the market depth data from the Interactive Brokers data feed being used in Sierra Chart, then try changing the state of the Global Settings >> Data/Trade Service Settings >> Data and Other Settings >> Clear Out Of Order Market Depth Data option.

It is recommended to set Clear Out Of Order Market Depth Data to False.

You will need to reconnect to the data feed after changing this setting.

Sierra Chart can handle both normal market depth and Level 2 data from Interactive Brokers. Although in the case of Level 2 data because there potentially are multiple entries at the same price level, when this information is displayed through features like the DOM Graph, there can be overlapping levels on the chart.

If you continue have issues with the market depth data from Interactive Brokers, consider using the Sierra Chart Exchange Data Feed to replace the market depth data from Interactive Brokers.

Using Interactive Brokers True Real-Time Bar Data

The standard Interactive Brokers data feed is a substandard data feed which provides incomplete price and volume data. You may want to use the Sierra Chart Exchange Data Feed with your Interactive Brokers account as an alternative.

However, Interactive Brokers provides another data feed that updates every 5 seconds which provides the accurate Open, High, Low, Last, Volume values for a 5 second timeframe. Sierra Chart supports this data feed. This data is transmitted at the end of the 5 second timeframe.

To use this data feed, enable Global Settings >> Data/Trade Service Settings >> Data and Other Settings >> Record True Real-Time Data in Intraday Charts. After enabling or disabling this option, it is necessary to select File >> Disconnect and then File >> Connect to Data Feed for the change to go into effect.

When Record True Real-Time Data in Intraday Charts is enabled, then Interactive Brokers True Real-time Bar data will be recorded in all Intraday charts no matter what the symbol, if this type of data is available for the symbol.

The way that the recording of the True Real-Time Bar data works is that the chart bars will update every 5 seconds using this true real-time data feed.

The Time and Sales data, market depth data, Current Quote data, and the last trade price box on the right side of the chart are updated as the standard Interactive Brokers market data feed provides data. So you will have fast updates with Time and Sales data, market depth data, Current Quote data, and the last trade price box, and 5 second updates with the chart bars themselves.

When using the True Real-time Data and this data feed is available for a symbol, the Intraday Chart bars are no longer updated with the standard data feed and instead only from this 5 second data feed.

The advantage of enabling Record True Real-Time Data in Intraday Charts is that the Open, High, Low, Close, and Volume values for each bar in the chart are now very accurate. Whereas when this option is disabled, all of these values are less accurate.

Bid Volume and Ask Volume data are not accurate when using the Record True Real-Time Data in Intraday Charts option. However, in the case of Interactive Brokers, Bid Volume and Ask Volume are not very accurate when not using this option either.

When using the Record True Real-Time Data in Intraday Charts option and a true 5 second data record is received from Interactive Brokers, then you will see 4 trades listed in the Time and Sales window for the symbol. They will have a volume of 0. This represents the Open, High, Low and Last trade prices for a True Real-Time Data record. The timestamps of these trades will be at the beginning of the 5 second timeframe. The including of these trades in the updating of the Time and Sales is necessary for trade order related processing. If you do not wish to see these trades within the Time and Sales window, then select the Settings menu. Set the Volume >= setting to 1. Press OK.

Charts Stop Updating: When using True Real-time Bar Data and you notice that the charts stop updating, then you will need to reconnect to the data feed by selecting File >> Disconnect and then File >> Connect to Data Feed.

Based on feedback, we have heard that sometimes the true real-time data feed stops and the only way to restart it is by a reconnection. We have no other solution for this because it is outside of our control.

When using this True Real-time Data Feed it does not matter what the Intraday Data Storage Time Unit is set to. The data will always be stored in 5 second units.

About Interactive Brokers

Interactive Brokers, a global electronic brokerage firm, provides professional traders, financial advisors, brokers and institutions low cost execution and clearing services for stocks, options, futures, forex, and bonds. For Interactive Broker's current commissions and information, visit the Interactive Brokers Commissions page. The Interactive Brokers Universal Account allows customers to trade stocks, options, futures, forex, and bonds on over 50 market centers in 14 countries from a single account.

Using Financial Advisor Accounts

Below is information about using an Interactive Brokers Financial Advisor account with Sierra Chart. Other than the information here, Sierra Chart support does not provide any support for these types of accounts. The functionality is provided as is and you have to evaluate whether the functionality is useful and whether it works properly for you. Due to the interface provided by Interactive Brokers for Financial Advisor accounts, Sierra Chart cannot have reliable integration to these types of accounts. Sierra Chart can submit orders to a Financial Advisor account, but the tracking of Orders and Trade Positions cannot be regarded as reliable.

Sierra Chart supports using an Interactive Brokers Financial Advisor account. You are able to submit orders from Sierra Chart to your Financial Advisor account.

To configure Sierra Chart for this, select Global Settings >> Data/Trade Service Settings.

Enable the Financial Advisor Settings >> Enable Financial Advisor Account Settings for Trading option. Fill in the other Financial Advisor Settings fields as you require. These fields are provided exactly as you have specified, with all orders submitted from Sierra Chart to TWS (Trader Workstation).

The specific text or values to use for the Financial Advisor Settings fields are beyond the scope of this document and of Sierra Chart support. Consult with Interactive Brokers documentation and their support department.

The following are the list of the fields that are submitted with orders when using a Financial Advisor Account:

  • Group
  • Method
  • Percentage
  • Profile

When using a Financial Advisor account, most likely you will need to rely upon the Sierra Chart calculated Trade Position data instead of the Position data provided by Interactive Brokers because there may not be Trade Position data for the particular Trade Account you have selected to trade from within Sierra Chart. To do this, refer to the Using Order Fill Calculated Positions documentation.

Based on user feedback, when using a Financial Advisor account you may want to disable Global Settings >> Data/Trade Service Settings >> Download Historical Order Fills on Connect.

Current Daily High and Low for Forex Data

The current daily High and Low data for the IDEALPRO Forex markets from Interactive Brokers on the real-time data feed may not represent the High and Low for the current date, but instead from a prior day. This will be most obvious in a Historical Daily chart. To avoid this issue in a Historical Daily chart, go to that chart and select Chart >> Chart Settings >> Advanced Settings and disable Allow Real-Time Updating of Historical Chart. This is an Interactive Brokers issue and we have no control over it. Avoid contacting Sierra Chart support about this.

Trading Related Error Messages

The following are common error messages that you may see reported in the Trade >> Trade Service Log , when making trades through Interactive Brokers from Sierra Chart and their meanings.

  1. Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. Error Code: 2109. : This message means that the order will be immediately processed and submitted into the market even if the current time is outside of the Regular Trading Hours for the market.
  2. Notice: An overfill UpdateOrder call has occurred.: This error message will occur when using an Interactive Brokers Financial Advisor account. It is harmless. While Sierra Chart does have some support for Financial Advisor accounts. Due to the inherent complexity of these types of accounts, Sierra Chart cannot handle all aspects of them perfectly. The reason this occurs is that when you submit an order in a Financial Advisor account, that account may be configured to submit the order into more than one subaccount. Therefore, there is going to be more than one fill reported for the order. These additional fills are from the sub accounts.
  3. Message from IB: API client has been unsubscribed from account data. IB Error Code: 2100.: This message means that the Trade Position data updates have been unsubscribed. It is normal to see this message because Sierra Chart has to unsubscribe and resubscribe to the Trade Position data updates in order to force an update of Trade Position data and when there are multiple trading accounts a user may have. Interactive Brokers has a very poorly designed API when it comes to providing Trade Position data updates.

Trading Related Issues

When using Interactive Brokers you could potentially encounter the following trading related issues:

  • Canceled order stays in a Pending Cancel state.
  • Submitted order stays in an Order Sent state.
  • Submitted and accepted order disappears from chart even though it is still working.
  • Current Trade Position is not displayed on chart or on the Positions tab of the Trade >> Trade Orders and Positions window.
  • A filled order remains in a Open state on the chart.
  • A Trade Position Quantity displayed in Sierra Chart does not update and is displaying a wrong Position Quantity. This can also be a problem if you are using the Order Fill Calculated Position in Sierra Chart.

There are various causes of these issues. From the perspective of Sierra Chart, the general cause is that Interactive Brokers does not provide the necessary order data feedback to maintain a proper state of an order, uses inconsistent symbols, or does not provide the necessary Trade Position data feedback for Positions.

If you encounter one of these problems, then you will need to contact Interactive Brokers technical support for help with these. They will need to review your TWS log file. They may not be able to help you with these kinds of issues. Therefore, please consider carefully whether using Sierra Chart with Interactive Brokers is appropriate.

Order Not Transmitted

When an order is submitted from Sierra Chart to Trader Workstation, it is always flagged to be transmitted by Trader Workstation. There never is any other possibility.

Therefore, if you see an order in Trader Workstation submitted by Sierra Chart with a "Transmit" button next to it, then this means that Trader Workstation is set to not transmit the order automatically. Contact Interactive Brokers support for help with this.

Orders Entered from Trader Workstation do Not Appear in Sierra Chart

When an order is submitted from Trader Workstation, in order for it to appear within Sierra Chart, it is necessary that Global Settings >> Data/Trade Service Settings >> Connection Details >> Instance be set to Client ID: 0 (Access All Orders).

After changing this particular setting reconnect to the data feed.

However, there can be a difference with the Symbol between a chart and the Symbol in the Trade >> Trade Orders and Positions >> Orders tab which will cause both order fills and working orders not to appear in a chart or Trade DOM.

This is due to the very complex and inconsistent symbology from Interactive Brokers.

Trade Position Line or Quantity Disappearing or Displaying Zero

If you are an Interactive Brokers user, and you do not see the Trade Position for a particular Symbol and Trade Account listed on the Trade >> Trade Orders and Positions >> Positions tab when the Trade Position actually exists for a particular Symbol and Trade Account, or the Position Quantity is incorrect, or the Position is displayed temporarily and disappears, then update to current version of Sierra Chart. Refer to Fast Update.

Updating in almost all cases will not make any difference. Sometimes over the years due to the substandard design of the Interactive Brokers TWS API, there have been problems with Trade Position data from the API that required changes on the Sierra Chart side to resolve. Therefore, by running the current version you can be sure that you have the latest support for Trade Position data from TWS.

If this does not resolve the problem, then understand that the problem is on the side of Interactive Brokers Trader Workstation and you must contact Interactive Brokers support for assistance for this kind of issue.

Basically the problem is why is it that Trader Workstation (TWS) is not transmitting the Trade Position data for the Symbol and Trade Account through the TWS API to the connected client, in this case Sierra Chart. Interactive Broker support may request the TWS Log files.

On the Orders and Positions >> Positions tab which displays the Positions, you will see Quantity and Trade Service Position Quantity fields. Normally these will match but could be different for up to 8 seconds. If the Trade Service Position Quantity remains at 0 when there is actually a nonzero Trade Position for a particular Symbol and Trade Account, then the Trader Workstation is not transmitting any Trade Position data to Sierra Chart.

For more information about this subject in general, refer to Incorrectly Reported Trade Position Quantity.

Another solution is to use the Order Fill Calculated Position. Although with this method you must be very diligent to make sure you have all of the order fills for the Symbol and Trade Account being traded.

Other than the information given in this section there is no further support that Sierra Chart can offer with this kind of issue and you should consider whether it is appropriate for you to be using Interactive Brokers.

Sierra Chart development and support cannot solve these numerous problems from Interactive Brokers. Either switch to a different supported trading service, or discontinue use of Sierra Chart.

Symbol Comparisons and Partial Symbols

Interactive Brokers has inconsistent and complex symbology specifications. It is the position of Sierra Chart, that this is a major fault of the Interactive Brokers system and it has no reasonable defense whatsoever. There is also the problem where it is possible to use SMART order routing but a Trade Position update will specify the specific exchange the symbol was filled on and this creates an inconsistency.

Therefore, based upon the security type, it often is not possible to match up the symbol provided with a Trade Position update from Interactive Brokers to the symbol of the Chart. For this reason a symbol is partially truncated by Sierra Chart when added to the Trade >> Trade Orders and Positions >> Positions tab, and when matching it to a chart, the chart symbol is truncated at the same location and a match is performed on the truncated text strings.

Therefore, when looking at the symbols on the Positions tab, you may see only a portion of the symbol. This is expected. However, if there are two symbols listed for the same security, this can be a problem and could potentially be the source of the problem where you do not see the current Position Quantity on a Chart or Trade DOM. In this case Sierra Chart support needs to be made aware of this.

Also, due to the substandard and complex design of the TWS API, you may see the Symbol for a particular Trade Position display as a number only on the Positions tab. This should only be for a short period of time. Less than about 10 seconds. If you see a number continuously displayed for a Symbol, then Sierra Chart Support should be made aware of this.

Interactive Brokers Historical Data Issues and Solutions

General Information

When using Interactive Brokers, the required historical chart data is downloaded from both the Sierra Chart Historical Data Service and from the Interactive Brokers system. Or depending upon the symbol, the historical data comes completely from the Interactive Brokers system.

You can experience many problems when this historical data is downloaded from the Interactive Brokers system. The Interactive Brokers historical data system is not always reliable and works as you would expect. This historical data is also called backfill.

You may experience a problem where the Interactive Brokers backfill system does respond, but does not give you data and this is known as a pacing violation or possibly the data is just not available. For information about pacing violations, refer to the Pacing Violations section.

You may experience a problem where historical data is not downloaded at all because the Interactive Brokers historical data system does not respond resulting in both a delay with chart updating and missing data. This is called a Timeout and how to deal with it is explained in the No Response When Downloading Historical Data and Timeouts section.

When using Sierra Chart Service Package 3 or 5, Historical Daily price data for major futures contract symbols, cash indexes and US stocks, is downloaded from the Sierra Chart Historical Data Service.

When using those Service Packages and Global Settings >> Data/Trade Service Settings >> Allow Support for Sierra Chart Data Feeds is enabled, then historical Intraday data for major futures contract symbols and US stocks is downloaded from the Sierra Chart Historical Data Service except for the most recent 10 to 15 minutes which will come from the Interactive Brokers system. This greatly reduces the problems with historical data from Interactive Brokers since that data is not used. Therefore, use Service Package 3 or 5 when using Interactive Brokers.

Avoid making postings on our Support Board about the possibility that the problems are with Sierra Chart. They are not, unless Interactive Brokers has made changes to their historical data system that require us to make changes. Also, do not assume that just because you see a problem with one Sierra Chart version and not in another, that somehow it is a Sierra Chart problem. The problem is simply intermittent and what you see is simply coincidental, or the relevant settings are different.

Interactive Brokers is a broker and not a data provider. Review the information in this section about historical data issues from Interactive Brokers. We have done our best to handle the limitations of Interactive Brokers data, however you still will encounter issues.

If you require very reliable and complete historical and real-time data, then the very best choice is to use the Sierra Chart Real-Time and Historical Exchange Data Service which is fully integrated with Interactive Brokers trading.

Although you may see a chart in TWS and you may not get a chart in Sierra Chart, does not at all imply there is something wrong with Sierra Chart. Their API simply is not delivering the data being requested for various reliability and technical reasons such as differences with request parameters.

Sierra Chart also employs special methods to filter out bad data to ensure reliable charts. It is for this reason (although very unlikely in almost all cases) that you may not see data in Sierra Chart compared with other programs.

Pacing Violations

Interactive Brokers has limits on the amount of historical data you can download during a short period of time. In the Sierra Chart Message Log opened with Window>> Message Log, you may see messages that contain the words pacing violation.

This message is from Interactive Brokers and it indicates the limit has been exceeded. There are several different pacing violation rules that Interactive Brokers has. If you get this error, it means you have violated one of their rules. When you get this error, there are some things you can do to minimize it. Follow these instructions:

  1. Select Global Settings >> Intraday File Update List and remove any symbols that are expired or you are no longer interested in, from that list.
  2. Close any charts you have open in open chartbooks for expired futures contracts, so there is not any unnecessary downloading. Interactive Brokers will still give you a pacing violation for historical data requests that return no data.
  3. Select File >> Data/Trade Service Settings.
  4. In the list of Service specific settings on the left, set the Data and Other Settings >> Maximum Historical Intraday Days to Download Limit to 15 days or less. The higher this number is set to, the longer historical data will take to download.. You must keep it to a small number to minimize pacing violations and avoid a long time to download historical data.
  5. Enable Allow Support for Sierra Chart Data Feeds to use Sierra Chart Historical Data for major futures contract symbols and US stock symbols for Intraday charts. Sierra Chart Service Package 3 or higher is required for this. Data for Historical Daily charts for major futures contract symbols, major index symbols, and US stocks symbols, will always be downloaded from the Sierra Chart Historical Data service if on Service Package 3 or higher.
  6. Optionally enable Support Alternate Forex Historical Data to use Sierra Chart Historical Forex data for Interactive Brokers -CASH-IDEALPRO symbols. Sierra Chart Service Package 3 or higher is required for this.
  7. Press OK.
  8. Select File >> Disconnect and wait a few minutes for the pacing violation condition to be removed by Interactive Brokers.
  9. Select File >> Connect to Data Feed
  10. In the case of Intraday charts, follow the Retrying the Download When There is Data in the Chart instructions to re-download the data in the chart to recover missing data.
  11. In the case of Historical Daily charts, follow the instructions in Help Topic 6.3 to re-download the data in the chart to recover missing data.

No Response When Downloading Historical Data and Timeouts

This section explains some things you can do to handle a problem where Interactive Brokers Trader Workstation (TWS) does not respond to historical data requests. Eventually this leads to the historical data request timing out and results in missing data in the chart. In the Sierra Chart Message Log, you will see a phrase that says The download timed out in a line for the Historical data requests.

The first thing that you should do is to make certain that you have the minimum amount of charts open and that the symbols of all of those charts are valid and current Interactive Brokers symbols. If you are using an incorrect symbol, then potentially this can lead to this problem. After you have closed some charts for symbols that you do not need or with invalid or expired symbols, then it is necessary to reconnect to the data and trade server by selecting File >> Disconnect and then File >> Connect to Data Feed.

Make sure the Historical Data Timeout Time In Minutes in Global Settings >> Data / Trade Service Settings is set to a reasonable time. We recommend 3 minutes.

When you see your charts say Waiting to Download or Downloading Historical Data, and there is no response for a while, then restart Interactive Brokers Trader Workstation (TWS). Be sure you do this within 3 minutes (default) before the timeout occurs. After restarting TWS, Sierra Chart will then reconnect to TWS.

When a download timeout does occur, the historical data download will fail for the symbol currently having historical data downloaded and all the other symbols will have the download canceled for them. This occurs if Cancel Active Backfill Requests on Timeout in Global Settings >> Data / Trade Service Settings is checked. If it is unchecked, then the remaining symbols will not have their pending downloads canceled and the historical data downloads will continue. However, this may be an excessively long time if the Interactive Brokers system does not respond, which is the reason why we recommend keeping that option enabled.

If you are missing historical data in your charts, refer to the Retrying Downloading of Intraday Data section and help topic number 6.3 for instructions to retry the download for Intraday and Historical charts respectively.

Slow Historical Data Downloading

Downloading historical data from Interactive Brokers is a slow process to avoid Pacing Violations. Also the Interactive Brokers system may respond slowly to historical data requests.

If you see Waiting to Download or Downloading Historical Data. Bars may not appear until done. displayed on a chart or charts for an extended time, then follow these instructions:

  1. Update Sierra Chart to the current version.
  2. Go to each chart you have open in each of the open Chartbooks and make sure the symbol of it is a valid and actively trading symbol. If it is not a valid symbol, then close the chart by selecting File >> Close Active Window. The easiest way to go through all of the charts in all of the open Chartbooks is to use Window >> Windows and Chartbooks.
  3. Select Global Settings >> Data/Trade Service Settings.
  4. In the list of settings on the left, set the Data and Other Settings >> Maximum Historical Intraday Days to Download Limit to 15 days or less.
  5. Set Download 5 Seconds Historical Intraday Data to False.
  6. Press OK.
  7. Select File >> Disconnect.
  8. Select File >> Connect to Data Feed.

Using Sierra Chart Historical Data

If your Sierra Chart Service Package includes the Sierra Chart Historical Data Service, then you can use that service for historical Intraday data for some symbols when using Interactive Brokers. In almost all cases you will want to use that service for much faster and reliable historical data access.

In the case of Historical Daily and higher timeframe charts, if your Sierra Chart Service package includes the Sierra Chart Historical Data Service, this service is always used for those charts for supported symbols.

Follow the instructions below to use this service.

  1. Select Global Settings >> Data/Trade Service Settings.
  2. Enable Allow Support for Sierra Chart Data Feeds.
  3. Optionally enable Support Alternate Forex Historical Data to use Sierra Chart historical Forex data for Interactive Brokers -CASH-IDEALPRO symbols.
  4. Set the Maximum Historical Intraday Days to Download >> Non-Tick Data / 1-Tick Data settings to 186. These settings can be made higher, if you require it. So it is OK to set these to a higher setting as needed.

    However, keep in mind that for symbols which are not mapped to the Sierra Chart Historical Data Service, that data will still come from Interactive Brokers and instead the Data and Other Settings >> Maximum historical Intraday Days to Download Limit setting applies. That needs to be set at 15. Do not make that setting too high otherwise it will take an extremely long time to download historical data!
  5. Press OK.
  6. Follow the instructions to Update the Symbol Settings. This is an important step to ensure Sierra Chart has the correct Symbol Settings to route data requests to the Sierra Chart Historical Data Service.
  7. Select File >> Disconnect.
  8. Select File >> Connect to Data Feed.
  9. Retry downloading the Intraday chart data again. For Intraday charts, follow the Retrying the Download When There is Data in the Chart section. Or go to the Intraday chart and select Edit >> Delete All Data and Download. This only needs to be done once per symbol.

Support Policy Regarding Interactive Brokers Historical Data

Depending upon the symbol and your Sierra Chart service package, historical data may come partially from the Sierra Chart Historical Data Service and partially from the Interactive Brokers historical data system. Or fully from the Interactive Brokers historical data system.

In the case where data is partially coming from the Interactive Brokers data system, usually this is only about 10 to 15 minutes of data. The majority of data will come from the Sierra Chart Historical Data Service.

Only data for major futures contracts, US stocks and some index symbols comes from the Sierra Chart Historical Data service.

If you are encountering a historical data problem involving data from the Interactive Brokers historical data system and you have received at least 15 days of current historical Intraday data or 6 months of historical Daily data, then as a matter of policy Sierra Chart support will not provide any help for the problem you are having.

There are several choices you have in this particular case. Use the Sierra Chart Exchange Data Feed if it provides data for the particular symbol you are having Interactive Brokers market data problems with. Live with the problem. Use another supported Trading service. Or discontinue use of Sierra Chart.

Also keep in mind that only major futures contracts have Continuous Futures Contract Rollover rules defined for them. Therefore, the Continuous Futures Contract Chart feature will not work with all futures markets unless the rollover rules are defined for them.

Missing Data Due to Incorrect Time Zone Settings

If you find that you are consistently missing historical data from your charts or the timestamps of chart bars are not correct, then you may have incorrect Time Zone settings. You need to have the correct Time Zone setting in Sierra Chart and in the operating system. It is also imperative that your computer's clock is accurately set. For complete information, refer to help topic 38.

Interactive Brokers Market Data Error/Status Messages

Data Feed Messages from Interactive Brokers with error codes 2104, 2106, 2107 displayed in the Sierra Chart Message Log indicate the status of market data connections to their servers. They are informational messages from Interactive Brokers. Below are examples of these messages and descriptions.

Message from Interactive Brokers: Market data farm connection is broken:usfuture. Interactive Brokers Error Code: 2103. Request ID: -1. (This message indicates the connection to the US future market data farm is broken.)

Message from Interactive Brokers: Market data farm connection is OK:usfuture. Interactive Brokers Error Code: 2104. Request ID: -1. (This message indicates the connection to the US future market data farm is now OK. If this message follows the message above, then the connection is now OK.)

Message from Interactive Brokers: Market data farm connection is inactive but should be available upon demand.usfarm.us. Interactive Brokers Error Code: 2108. Request ID: -1.

Interactive Brokers Historical Daily Data

In Sierra Chart, you have the option of downloading historical Daily data from Interactive Brokers as 24 hour bars or regular trading session only bars.

However, this option will not work when the symbol is mapped to the Sierra Chart Historical Data Service. The data from that service will always contain the full 24 hour of trading for each Daily bar unless the symbol is a stock.

To change the setting to download regular trading hours Daily bars, select Global Settings >> Data/Trade Service Settings. If the option Data and Other Settings >> Download Regular Trading Hours Bars (Daily Bars Only) is set to True, Sierra Chart will only request the regular trading hours Daily bar data.

Otherwise, a request for the standard 24-hour Daily bar data will be made.

If you made a change to the Download Regular Trading Hours Bars (Daily Bars Only) setting, then you need to re-download the data in the Historical Daily charts to get the regular trading hours bars. You need to do this only once for each symbol. To do this go to a Historical Daily chart and select Edit >> Delete All Data and Download. This only needs to be done once for each symbol.

Time and Sales Window Data

The data that you see for a symbol in the Time and Sales window when using Interactive Brokers consists of 3 categories of data.

The first category of data are normal Interactive Brokers trade messages for a symbol. There is no assurance that this data is complete from Interactive Brokers and we cannot help with it.

The second category of data is trades which are inserted by Sierra Chart in order to make the volume for chart bars match the total Daily Volume for the symbol. This is documented in the Simulate Trades to Match Daily Volume section.

The third category of data is prices which are from the True Real Time Data Feed.

If Sierra Chart support has referred you to this section, please do not ask us further about discrepancies. We cannot help with them. And please do not use the argument that you do not see the problem in another program. Such a statement is not relevant to the limitations of the Interactive Brokers substandard data feed. We explain the origin of the data above. You are welcome to use whatever program that meets your requirements.

One solution to the problem is to use the Sierra Chart Real-Time and Historical Exchange Data Feed instead of the substandard Interactive Brokers data feed.

Orders Disappear after Being Submitted Although They Are Still Open

In the case when you submit an order from a chart or Trade DOM and the order disappears within about 10 seconds after being submitted, even though the order is still working and has not yet been filled, follow this procedure for help with this:

  1. For the order that disappears, locate the order in the Trade >> Trade Orders and Positions >> Orders tab. Get the Service Order ID for it.
  2. Send an email to API@interactivebrokers.com and ask them why when a reqOpenOrders call is made through the API, why is there not a response for the order ID ( tell Interactive Brokers the ID you got from the Service Order ID field in Sierra Chart). The fact that there is no response indicates the order is no longer open.
  3. Interactive Brokers may need to see your TWS log file. They will give you instructions on how to provide that.

Interactive Brokers Stop Order Trigger Method

It is possible to specify how Interactive Brokers Simulated Stop and Stop-Limit orders are triggered. This setting can be changed in Global Settings >> Data/Trade Service Settings >> Interactive Brokers Stop Order Trigger Method.

Changing this setting has no effect upon Stop orders entered directly from TWS.

The valid values are as follows:

  • 0 = The default value. The "double bid/ask" function will be used for orders for OTC stocks and US options. All other orders will used the "last" function.
  • 1 = use "double bid/ask" function, where stop orders are triggered based on two consecutive bid or ask prices.
  • 2 = "last" function, where stop orders are triggered based on the last price.
  • 3 = double last function.
  • 4 = bid/ask function.
  • 7 = last or bid/ask function.
  • 8 = mid-point function.

Procedure for Providing TWS Log Files

Please refer to the below directions for assistance.

  1. In TWS, navigate to Edit > Global Configure > Settings > API > Settings.
  2. Then within Setting change the Logging Level to Detail.
  3. Check the box Create API message log file and hit Apply and OK.
  4. Replicate the problem again and reply to this e-mail with a new log file attached.
  5. Both log files are located within C:\JTS directory and it is named log.Day.txt (TWS Log File) and api.clientId.Day.Log (API Log File).

Once the logging levels have been adjusted please restart TWS. Now that the adjustments has been made please replicate the issue again then reply back with a new copy of both the TWS and API Log file attached as well as details of the specific order.

Historical and Real-time Stock/Equities Data Volume Differences

The volume data for equities/stocks from Interactive Brokers is in units of 100s. Therefore, a trade of 100 shares will be reported with the volume of 1. As a general rule Sierra Chart does not alter price or volume data from a Data or Trading service.

In the past, Sierra Chart was modifying stock volume data from Interactive Brokers by multiplying it by 100. There have been problems associated with this. And newer versions of Sierra Chart do not do this any longer.

When the Sierra Chart Historical Data is set to be used when using the Interactive Brokers trading service, the historical equity/stock data is downloaded from the Sierra Chart Historical Data Service which has volume as actual values. Therefore, the volume values from the Sierra Chart Historical Data Service are higher by 100 times the amount of the Interactive Brokers volume data.

Not only is there a problem with the volume numbers being too low from Interactive Brokers but the real-time data as well when not using the Sierra Chart Exchange Data Feed is incomplete.

To multiply the volume for stock symbols by 100 so you see the actual volume in Quote Boards, change the Volume Multiplier to 100 for the stock symbol patterns in the Global Symbol Settings.

The solutions for Intraday charts for the above-described problems are as follows:

  1. Activate the Sierra Chart Exchange Data Feed on your Sierra Chart account and activate the US Equities exchange. As of this writing the cost of this is 45.50 USD per month which includes the exchange fees. With this data feed, both the historical and real-time data will be used from this data feed instead of the Interactive Brokers data. Obviously this is a huge improvement and provides you a reliable data feed. This solves the volume inconsistency and provides you very accurate tick by tick data which is necessary for accurate chart bars. The real-time data is completely matched with the historical data.
  2. The second solution is to not use the Sierra Chart Historical Data Service and rely completely upon the Interactive Brokers historical data. To do this, select Global Settings >> Data/Trade Service Settings . Uncheck Allow Support for Sierra Chart Data Feeds.
  3. When not using the Sierra Chart Historical Data Service, in the stock charts you will want to multiply the volume by 100. To do this select Chart >> Chart Settings >> Advanced Settings 2. Set the Volume/Open Interest Multiplier to 100. Do this for each stock chart.

    This Volume Multiplier will be reset back to the default of 1 when changing the symbol of the chart. To prevent this, change the Volume Multiplier to 100 for the stock symbol patterns in the Global Symbol Settings.
  4. After performing either of the above steps, it is necessary to re-download the data in your Intraday charts to make the historical volume data completely consistent. To do this, go to the chart and select Edit >> Delete All Data and Download. This only needs to be done once per symbol.
  5. Do not contact Sierra Chart support wanting some other solution to the problem because we have no other solution to offer. If you have any questions about the above, let us know.

*Last modified Wednesday, 21st September, 2016.