It is not a "supported" way, but it works. The advantage is, that one don't get disconnected every 24 hours. IB Gateway runs leaner and more stable than TWS. That is important if you use NT to run autotrading strategies through IB.
1) Download and install TWSStart (http://twsstart.free.fr/) If you also use TWSStart to run and monitor TWS, create a new installation folder for TWSStart that runs IB Gateway (eg. "TWSStart - IB Gateway")
2) In Ninjatrader set up a new connection called IB-Gateway. Use Interactive Brokers as Provider. Set the port to 4001 and use client id 1.
3) In TWSStart go to "Startup Settings". Use "SDH Alternate 1" as data handling method and type in your user name and password.
4) In TWSStart go to "Monitor Settings". Enable "Monitor Connection". Host 127.0.0.1 , Port 4001, Client ID 123 (or any other than the one you use in your NT connection)
5) In TWSStart go to "Java Settings". Enable "Start IB Gateway".
6) In TWSStart go to "External Programs". Configure the start of "IBGW4NT7.exe" from your TWSStart folder.You find the file in the TWSStart folder you created in step 1.
7) Go to "Load TWS" in TWSStart and click on "Run".
8) Start NinjaTrader and connect to "IB Gateway".
Comment