Interactive Brokers Broker Profile

From MultiCharts
Jump to navigation Jump to search
Click here to see the video tutorial on how to connect Interactive Brokers Broker Profile.

To connect MultiCharts to Interactive Brokers (IB), it is necessary to have IB software installed and launched on the computer. IB provides two applications that can be used for connection to MultiCharts:

  1. IB Trader Workstation.
  2. IB Gateway.

Though there is choice between web-based and standalone version, standalone version is recommended for MultiCharts connection. To download Trader Workstation and Gateway, follow this link:

http://individuals.interactivebrokers.com/en/control/systemstandalone.php?os=win&ib_entity=llc

For FOREX trade size should be equal to the amount of units, not trade lots.

Open position Profit/Loss is calculated in MultiCharts as IB API provides Profit/Loss values with a delay.

Unrealized Profit/Loss for the account is calculated by Interactive Brokers and displayed in MultiCharts.


Note: Interactive Brokers supports native and simulated One-Cancels-Others group (see Setting up Interactive Brokers Profile).

Native OCO-group is used when the broker’s plug-in supports OCO-groups. In this case all OCO orders are sent to the broker directly and unfilled OCO orders will be cancelled by the broker.

Simulated OCO-group means that all OCO orders are sent to the broker, price is monitored by MultiCharts and once one of the orders is filled, other orders from this OCO group are cancelled by MultiCharts. When one of the OCO orders is filled, MultiCharts sends a command to cancel the second OCO order to broker. Note that the second order may also be filled if price reaches its level before the cancellation is processed by the broker (see OCO-Orders Risk).

Interactive Brokers Profile is already created when MultiCharts is installed. It is not necessary to reconfigure its settings if only one IB account is going to be used with no subaccounts, but it is Important to set up connection parameters in IB TWS.

Setting up connection to 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 Broker Profile in MultiCharts Port (Socket port) number is 7496. If more than one IB TWS are going to be used, then separate Broker Profile should be created per each additional IB TWS and set their Port numbers accordingly, but each IB Broker profile should have unique Port number, that corresponds to one IB TWS.

It is recommended to add 127.0.0.1 to Trusted IP Addresses.

Setting up connection to Interactive Brokers Gateway

IB API option should be selected when logging in to IB Gateway.

  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 in IB Gateway Socket port number is 4001. In IB Broker Profile in MultiCharts default Port (Socket port) number is 7496.

It is recommended to add 127.0.0.1 to Trusted IP Addresses.

Setting up Interactive Brokers Profile

In the Properties Interactive Brokers window (see Managing Broker Profiles) enter the information provided by Interactive Brokers.

In the pop-up window there are 2 tabs: Settings and Financial Advisor Settings.

On the Settings tab the following parameters are available:

General Settings section

IP address and Port number Client ID. “0” by default. If there is another trading platform running on your computer that is connected to IB TWS, it is recommended to change the corresponding value in that piece of software.

Default Order Settings section

Time in Force:

  • DAY
Order is canceled if it is not executed by the close of the trading day. DAY is set as default; or:
  • GTC (Good-Till-Canceled)
Order remains active until it is cancelled.
  • IOC (Immediate-or-Cancel)
Any portion of an order that is not filled is to be canceled as soon as it becomes available in the market.

Settling Firm.

Clearing Account.

Default Account.

All or None Execution. An order waits for a specified number of contracts at broker. Either all are filled or none of them.

  • Entry Orders; or:
  • Exit Orders

OCO Group section

Use Native OCO Group Turn on this function to use native OCO group realized by Interactive Brokers, otherwise, OCO group is emulated by MultiCharts.

Reduce Size OCO

When one order of the OCO group is partially filled, the size of other orders in this group is reduced proportionally.

Example: Three buy stop orders with the size of 2 are sent in OCO group. One of the orders is partially filled (1 contract). The size of the two other orders is reduced by 1.

Overfill Protection Turn on to send only one order of an OCO group to the exchange. Other orders of this OCO groups will be held and monitored in TWS. If this option is disabled all orders of the OCO group are sent to the broker.

Connection Settings section

Disable auto trading after X seconds on the connection loss.

In case of the connection loss turns auto-trading off after the specified period of time if the connection is not re-established.

Financial Advisor Settings

To set up Financial Advisor account, select the Financial Advisor Settings tab.

There are 3 options to select:

  • Automatic Allocation
Group: a group of accounts should be created in TWS and the name of the group should be put to this field.
Method: a method of allocation for the group should be specified.
Percentage: percentage of allocation should be specified.
  • Manual Allocation
Profile: a profile in IB TWS should be created, where all the settings are set up and the profile name should be put to this field; or:
  • Single Account Allocation
Account: only 1 account of the group should be specified to send all the orders directly on this account.