IB Gateway Feed

Ensign 10 and Ensign Windows can receive the Interactive Broker feed through the IB Gateway or through the IB Trader Workstation.   The advantage of the IB Gateway is it does not have the overhead of showing a quote page or trade platform.   Also, the IB Gateway is not required to be shut down each day whereas TWS does shut down.

Get the IB Gateway from the IB web site using this link.  It installs with the TWS.

http://download.interactivebrokers.com/download/tws40_install.exe

Gateway can be found in the Start menu, All Programs | Interactive Brokers folder.  Drag the Gateway icon to the desktop so there is a desktop link named IB Gateway.

For Ensign Windows, run Gateway and manually connect.   Ensign Windows will find Gateway running and connect to it to receive the feed from Interactive Brokers.

For Ensign 10, check the box Use IB Gateway instead of TWS found on the Setup | Feeds form.  Ensign 10 can run IB Gateway and accomplish the login process.

 IB Gateway uses the same Username and Password as is used by TWS.   Note in the above example that the Reconnect time has been blanked out which is appropriate since Gateway remains running and does not need to be rerun by Ensign each day.

To log in to IB Gateway the 1st time, you need to change the bullet selection to IB API.  Then enter your Username and Password.

You must change the port setting that Gateway listens on for Ensign to connect to it.   In Gateway, click menu Configure | Settings | API | Settings and change the port to 7496.  And create the entry in Trusted IP Addresses for  127.0.0.1  as shown here.

IB: Ensign unable to find TWS

IB users that upgrade the TWS may experience connectivity problems. The upgrade has unchecked a setting in the TWS global configuration that is important for the Ensign connection. To re-apply this setting click on the TWS and select menu Edit | Global Configuration.

Then select Display at left [1], click on the styles submenu [2], and recheck the box at top that says “Use system title bar” [3]

You will need to close and reopen Ensign to establish the connection.

Interactive Broker Chart Volumes

Q:  Why does my 15-second chart from IB have less volume than the same chart in Ensign?  When I refresh the Ensign chart from IB, the volume difference is corrected.

A: The higher volume bars in Ensign should be considered to be more correct than the IB chart, and here is why.   IB is a sampled feed, meaning they do not send all ticks.  The IB chart is charting the ticks seen and summing the tick volumes on those ticks. Ticks NOT sent, because it is a sampled feed, are totally ignored.

Ensign, on the other hand, compares the tick volume on the tick received with the change in total volume. Then they match, Ensign uses the tick volume value. When they differ, obviously some ticks were not sent and Ensign adds a filler tick with the needed tick volume to stay in sync with total volume.  These inserted ticks with the missing tick volume are the source of the larger volume values shown in Ensign compared to IB.

When the tick database is refreshed, Ensign receives 1 second records from IB to work with and this erases the filler ticks with the missing tick volume.  Thus the refreshed result looks more like the IB chart.  The refresh has forced Ensign to miss the ticks that the IB chart missed.  What Ensign is doing to account for missing volume in the live feed it better than what IB is doing.  The chart Ensign shows with the inserted missing tick volume is MORE like the charts from other data vendor who send all ticks.  It is recommended that refresh only be used when data is missing.

FYI, Ensign 10 does the same thing for the Yahoo Finance feed which is also a sampled feed.  Ensign 10 watches the change in total volume to calculate the tick volume that must have occurred since the last tick was received.

TWS Auto Logoff Timer

Q:  How do I change the time when TWS does its daily shut down?

A:  Use the TWS Configure button to edit the time for the shut down.

TWS Auto Logoff Time

Then in Ensign, on the connection form for the Interactive Brokers feed, enter a time for Ensign to rerun TWS that is 1 minute later than the auto logoff time.