Live Trading

Connecting to Interactive Brokers

AlgoEye can connect to an instance of TWS or IBGateway running on your PC or anywhere in the Net. In order to establish a connection you will need to to:

  1. Run TWS or IBGateway.
  2. Allow API connections.
  3. Set up port number and add AlgoEye server to trusted IP addresses.
  4. Set up your firewall to allow incoming connection to the port if needed.

Configuring TWS to work with AlgoEye

Run TWS as usually specifying the username/account you want to trade with.

_images/tws_login.png

After logging into TWS click Edit then Global Configuration.... Make sure Enable ActiveX and Socket Clients is ticked otherwise the interface for third-party applications is turned off and AlgoEye won’t be able to connect to your TWS. Change Socket Port number if necessary and add the server IP shown on the AlgoEye Trader page (https://algoeye.com/trader) to the list of Trusted IP Addresses.

_images/tws_settings.png

Running IBGateway On Your PC

Please read carefully the official Interactive Brokers instructions on setting up IBGateway before proceeding.

https://www.interactivebrokers.com/download/newMark/PDFs/gateway.pdf

After installing and running the gateway you will see the login screen.

_images/ibgateway_login.png

If you don’t already have FIX connection or don’t know what it is then select IB API - the native Interactive Brokers interface for third-party applications. Type in your username and password then click Login. You will see the main screen with a green bar if the gateway connected to Interactive Brokers servers successfully.

_images/ibgateway_main1.png

The last step is to set up port number and add AlgoEye server to the list of trusted IP addresses. Click Configure and then Settings to bring up configuration screen. Change Socket Port number if necessary and add the server IP shown on the AlgoEye Trader page (https://algoeye.com/trader) to the list of Trusted IP Addresses.

_images/ibgateway_settings.png

Running IBGateway On a Headless Linux Server

# install Monit
sudo apt-get install monit
wget https://download2.interactivebrokers.com/download/unixmacosx_latest.jar
echo "Done"