NinjaTrader 7 and IB Gateway
Enable support using the option "IBGW4NinjaTrader7" or using the tool "IBGW4NT7".
Since TWSStart 2.6.0.133 there exists a new option
"IBGW4NinjaTrader7" to enable NinjaTrader to connect to the IB Gateway.
The following description shows how to use this option.
1. Setting up NinjaTrader 7
|
Start NinjaTrader 7 and select "Other" for "Connection" and press the "Connect" button. |
|
The Connection Wizard appears to create a new connection. Press the "Next" button to continue. |
|
Enter a connection name, for example "IB Gateway" and select "Connect on startup". |
|
Leave the fields "User name" and "Password"
empty. The "Port" number must be the same one you use in the IB Gateway "API Settings". Select a "Client ID", for example 123. |
|
Be sure that you have entered in the previuos dialog the same
"Port" number as defined in the IB Gateway API Settings dialog under "Socket port". |
|
Verify the settings of the new connection again and press "Finish" to close the Wizard. |
2. Setting up TWSStart 2.6
|
Verify that an "IB Gateway" installation is
selected in TWSStart.
The "Path to JAR or EXE file" is automatically set with the correct data. |
Enable the new option "IBGW4NinjaTrader7" using
the TWSStart.INI Inspector or
edit directly the file TWSStart.INI by setting this option to "True". Make sure to restart TWSStart after changing the option. |
In the "External Programs" list, fill out the
field "Application Name" with a name of your choice.
In the next field, enter the complete path and filename, where you installed NinjaTrader or use the button next to the field. Use "CONTROL CENTER" as "WindowTitle" and check the option "Check filename". Press the button "Add", to add a new entry to the list of "External Programs". You can now test the settings by double-clicking on the new entry. It should start the application. External programs are started by TWSStart after successfull login. |
You can start the 32-Bit or 64-Bit version of
NinjaTrader 7.
For both versions an entry in the list is possible, but only one entry should be checked. Only checked entries are started. |
If you plan to close TWSStart after Login, make sure that the option "Auto-Close/Do not close automatically" is selected.
|
You can downdload an EPS file (External Program Settings file) for NinjaTrader 7 from here.
The file contains the default settings for NinjaTrader 7 and IBGW4NT7. If you didn't use the default path during installation of NinjaTrader 7 and TWSStart, you must enter the correct filenames. The file must be placed into the TWSStart folder. |
To start the IB Gateway and perform a Login automatically after starting TWSStart,
enable the option "Automatically load TWS". |
3. Starting the IB Gateway and NinjaTrader using TWSStart 2.6
|
Press the "Run" button in TWSStart's title or use
the "Run" button on the "Load TWS" page to start the IB Gateway.
Or just close TWSStart and restart it, if you have enabled the option "Automatically load TWS". After a while, the IB Gateway is loaded, NinjaTrader is started and connected to the IB Gateway. Troubleshooting: In case that NinjaTrader 7 could not connect to the IB Gateway, first check that the following status message in the TWSStart EventLog: "IB Gateway ready for connection from NinjaTrader 7" If this is not the case or there is an error message, you must use the external program "IBGW4NT7" to preprare the IB Gateway. If everything is Ok, check the port numbers in NinjaTrader 7 and IB Gateway, as well as you Client ID. |
When NinjaTrader 7 tries to connect to the IB Gateway, an alert may popup.
You can configure the IB Gateway API Settings to avoid this message. |
The IB Gateway reports the client with ID 123 (NinjaTrader 7) connected.
This is the number entered in the "Connection Options" for "Interactive Brokers" in NinjaTrader 7. |
NinjaTrader 7 connected to Interactive Brokers (IB Gateway)
|
Back