amibroker

HomeDevLog

New Interactive Brokers data plugin v1.6.0 released

A new version (1.6.0) of IB plugin has been released.

Download link: http://www.amibroker.com/bin/ib160/IB.dll

Instructions: http://www.amibroker.com/ib.html

CHANGES (as compared to 1.5.1):

  1. added handling of TWS error message = 300 (can’t find Eid)
  2. added handling of TWS error message = 165 (HDMS disconnect) – allows to workaround TWS throttling
  3. added “Cancel Backfill” menu option
  4. added “Minimum” backfill length that backfills in less than a day if you have already some data from today
  5. most recently selected backfill length is stored between session
  6. added separate connection for backfill to workaround TWS problems with hanging backfills plus automatic reconnection if backfill times out or HDMS disconnects
  7. added some runtime checks for valid pointers to workaround TWS bug of sending incorrect IDs for certain messages
  8. quotes after backfill are flushed from plugin memory
  9. added get_quotes notification for use in future versions of AmiBroker

This new plugin is an attempt to workaround a very annoying ‘feature’ in TWS API: hanging (or throttling) historical data requests (see this IB discussion, and this)

Most recent versions of TWS simply refuse to deliver any more historical data after making about 50 requests. Consecutive requests hang and after about 2-3 minutes application receives error 165 (HDMS disconnect). Then the only chance to resume working is to disconnect and reconnect. New plugin does that automatically. When it detects time out or receives error 165 “disconnect” it kills existing connection and connects with new client ID. To improve reliability backfill connection is now separate from streaming connection, so these reconnects do not affect streaming real time data.

Comments are closed.