Difference between revisions of "Interactive Brokers"

From MultiCharts
Jump to navigation Jump to search
Line 20: Line 20:
 
==To set up connection in Interactive Brokers Gateway:==
 
==To set up connection in Interactive Brokers Gateway:==
 
'''IB API''' should be selected when one logins to IB Gateway.
 
'''IB API''' should be selected when one logins to IB Gateway.
# Click on '''Configure''' in main TWS window.
+
# Click on '''Configure''' in main IB Gateway window.
 
# Click on '''API''' section. Select '''Settings'''.
 
# Click on '''API''' section. Select '''Settings'''.
 
<div style="background-color: #E3FBE5;">'''Note''': By default in IB Gateway '''Socket port''' number is '''4001'''. In IB data source in QuoteManager default '''Port''' ('''Socket port''') number is '''7496'''. The ports should be the same.</div>
 
<div style="background-color: #E3FBE5;">'''Note''': By default in IB Gateway '''Socket port''' number is '''4001'''. In IB data source in QuoteManager default '''Port''' ('''Socket port''') number is '''7496'''. The ports should be the same.</div>

Revision as of 16:12, 20 July 2016

Here you can find Interactive Brokers Video Tutorial.

To connect MultiCharts to Interactive Brokers (IB) data feed, it is necessary to have IB software installed and launched on the computer.
When the connection is set up correctly, MultiCharts brings up IB software automatically when data is requested. IB has 2 applications that can be used for connection MultiCharts to IB:

  1. IB Trader Workstation. (requires 1 logout per 24 hours)
  2. IB Gateway.
Note: Java version 7 is strongly recommended for IB software to work correctly.


Though there is choice between web-based and standalone version, standalone version is recommended to use.
To download IB Trader Workstation and IB Gateway, follow this link: http://individuals.interactivebrokers.com/en/control/systemstandalone.php?os=win&ib_entity=llc

To set up connection in Interactive Brokers Trader WorkStation:

Enable Active X and Socket Clients box should be checked in IB TWS settings:

  1. Click on Configure in main TWS window.
  2. Click on API section. Select Settings.
  3. Check Enable Active X and Socket Clients box.
    Note: By default both in IB TWS and IB data source in QuoteManager Port (Socket port) number is 7496.
  4. That is required to add 127.0.0.1 to Trusted IP Addresses.

To set up connection in Interactive Brokers Gateway:

IB API should be selected when one logins to IB Gateway.

  1. Click on Configure in main IB Gateway window.
  2. Click on API section. Select Settings.
Note: By default in IB Gateway Socket port number is 4001. In IB data source in QuoteManager default Port (Socket port) number is 7496. The ports should be the same.

It is recommended to add 127.0.0.1 to Trusted IP Addresses.

To set up Interactive Brokers data feed connection:

  1. In the QuoteManager main menu select Tools, then click Data Sources and click on Interactive Brokers.
  2. In the popped up window choose whether you have a standalone installed on your PC version of IB TWS / IB Gateway or a web-based one. Standalone version is recommended to use.
  3. Click Ok.
  4. Once you clicked Ok, the Interactive Brokers Data Feed Configuration window is opened. It is recommended to use default settings.
  • Connectivity section.
    Make sure the Server IP Address and Port numbers are correct.
    IB TWS can be launched automatically by MultiCharts on attempt to add a symbol from IB data source; once a chart, DOM, Market Scanner window with IB instrument is open. To enable this option check Launch Trader Workstation at start box.
  • Historical data section.
    There is no need to reconfigure settings in this section. It is set up by default. ==Advanced users can check/uncheck the following options.==
  • Download historical data.===
  • Regular Trading Hours. Check the box to have standard trading session for daily-based charts.
  • Do not request ticks for intervals that has no minute data.
    If the box is checked, MultiCharts assumes that the interval that has no minute data from server also doesn’t have tick data.
  • Filter bars with zero volume box.
  • Filter bars with zero price box.
  • TWS bar timestamp.
    It is not recommended to check this function to avoid possible problems with mixing session settings and missing bars on chart.
  • Simultaneous loading of Historical Data across all symbols/charts.
    If the box is checked the data is requested for all symbols simultaneously, not in a particular order.
  • Utilization of cache for real-time price data.
    Example: historical minutes are requested as minutes from server up to the latest one. The latest historical is plotted from ticks up to the present moment. All the data that is collected in real-time (ticks) is used to build minutes.
    Note: Due to IB Pacing Violation limitation MultiCharts stores realtime IB quotes in a cache until the restart of the platform. When you reload a chart in order to avoid pacing violation the data is taken from this cache. If you want the data to be directly loaded from IB servers, please disable this option. To make this setting come into effect you need to restart MultiCharts and all of its applications.
  • Plot ticks either from 1 second snapshots or 5 second snapshots from server.
  • Plot minutes either from 1 minute snapshots or 15 minute snapshots bars.
  • Real-Time section.
    There is no need to reconfigure it. It is set up by default.
  • Use server timestamps.
    Time of Trades is taken from IB servers. Does not apply to Ask and Bid data for Forex symbols. It is not recommended to check this function to avoid potential problems with session settings and missing bars on chart.
  • Generate a new tick if total volume changes.
    Turn on this function if you need total volume for the session. By default it is turned on. When turn on, the Trade Tick Volume = current TotalVolume – previous TotalVolume. This option also helps to avoid spikes coming from IB API in real-time feed.
  • Click the Reset button to restore default settings.


To add an instrument manually or from data source, see Adding Symbol(s) to Symbol List.

Also, make sure that you set up Interactive Brokers broker profile for trading and Interactive Brokers broker plug-in for auto-trading.