Prior to setting up an Interactive Brokers
account connection you must have installed NinjaTrader.
Please review
the installation guide for
further instructions.
System Requirements
Critical: You must use standalone TWS
884 with the current production
release of NinjaTrader - Download
Common Connection Problems
1. Start Interactive Broker’s TWS (Traders Workstation)
2. Select the menu "Configure > API > All API Settings..."
3. Enable the following options as per the image below
- Enable ActiveX and Socket Clients
- Download open orders on connection
- Include FX positions when sending portfolio
- Send status updates...
- Set the Socket port to a value of "7496"

4. Start NinjaTrader
5. From within the Control Center window, select “Tools > Account
Connections…”
6. In the Connection Manager window, press Add…
7. Follow the instructions provided in the Connection Wizard
8. Enter your connection options as per the image below
9. If you wish to use NinjaTrader to trade Forex on IDEALPRO please follow these additional instructions

*User name – Your IB account user
name
*Password – Your IB account password
*Host – Leave this as “localhost”
unless you want to connect NinjaTrader to TWS running on another PC
within your local area network. If connecting over a network, enter
the computer name or IP address
Log level – Leave set to “Error”
unless otherwise instructed
Port – Ensure that this value is
set to the same value set in TWS (step 3 above)
Client ID – Leave this set to zero
“0” unless otherwise instructed
Trigger after hours – Enable this
if you want stop orders to trigger outside of standard trading hours.
This will only work if you also have “Allow triggering outside
of regular trading hours” enabled in TWS
(Configure > Order > Stop Trigger Method menu)
Auto logon – Enables NinjaTrader
to automatically start and log on to TWS
Run-time pop up handling – Enables
NinjaTrader to suppress TWS pop up windows
SSL – Enables secure socket layer
Local OCO simulation – Enables NinjaTrader
to handle OCO (one cancels other order handling)
on your local PC. DO
NOT enable this unless otherwise instructed.
Use user settings – Enables NinjaTrader
to use TWS user settings when automatically started
FOREX Trading Requirements
If you are trading curency (forex) instruments with Interactive Brokers you must set the quote display to show prices in 1/2 pips.
1. Start NinjaTrader
2. From within the Control Center window, select "Tools > Options"
3. Select the "Misc" tab
4. Select "HalpPip" option for "Quote currencies (FX) in:" setting as per the image below
Common Problems Connecting To Your Interactive Brokers
Account
Always check the Control Center Log tab to see if there are any connection
error messages.
I try to connect but nothing happens
This is usually because TWS is not configured correctly. Please review
step 2 above.
I see an error message “Target machine
actively refused…”
If you have another 3rd party application connected to TWS, ensure that
it is not using a Client ID value of zero.
Try shutting down this application
and then connecting NinjaTrader to TWS.
|