MultiCharts Easter Sale has jumped in! Up to 50% off Explore offers
+1 888 340 6572
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
feature_request_small.png
Open Feature request MC-1854

Interactive Brokers historical data feed not implemented properly: 5 years limit + duplicate requests

action_vote_minus_faded.png
3
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

When retrieving historical data, the IB data feed ignores the data range settings, never returns more than 5 years of data and also requests the same data several times. Here is an example request series that the plug in sends to the IB API:

20-6-1000001-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20150428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000002-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20150428 21:09:00 UTC-1 day-2 Y-1-TRADES-2--
20-6-1000003-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20150428 21:09:00 UTC-1 day-3 Y-1-TRADES-2--
20-6-1000004-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20150428 21:09:01 UTC-1 day-4 Y-1-TRADES-2--
20-6-1000005-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20150428 21:09:01 UTC-1 day-5 Y-1-TRADES-2--

You can see that
a) the "end date" field stays more or less the same - it is always "DateTime.Now()"
b) the "duration" field goes from "1 Y" all the way up to "5 Y".

So what you are doing here effectively in this example is requesting 5 times data for 2015, 4 times data 2014, 3 times data for 2013 and so on...

These duplicate data requests might be useless and make the whole thing slower. However, what really annoys me is the fact that you seem to stop after 5 years.

To cut a long story short, here is what needs to be done to make the whole thing work nicely - I'll show you first the log file then the explanation:

20-6-1000001-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20150428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000002-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20140428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000003-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20130428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000004-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20120428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000005-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20110428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000006-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20100428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000007-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20090428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
20-6-1000008-0-QQQ-STK--0---SMART-NASDAQ-USD---0-20080428 21:08:59 UTC-1 day-1 Y-1-TRADES-2--
...
...

In other words: You want to
1) get DateTime.Now() only once at the start (or ideally use the "To" value from the data range settings that your system offers under Format Instrument --> Setting)
2) then make a series of IB API requests where you gradually go back in 1 year steps in the "end date" using the DateTime value retrieved in 1) for the first request
3) loop until you do not receive any data any more from IB (or ideally until the data received crosses the "From" value from the data range settings)

Steps to reproduce this issue

1) Open MC.Net
2) Make sure you are using the Interactive Brokers data feed
3) Go to Format --> Format Instrument --> Setting
4) Enter some data range using the "From" and "To" fields
5) Connect to the broker
6) Go to View --> Reload --> Reload all data

Observable problem: You don't get more than 5 years of historical data which is NOT an IB limitation.

If anything is unclear, do not hesitate to get in touch.

Comments (1)
#0
user-offline.png  MultiCharts Support (MultiCharts)
May 29, 2015 - 11:06

1. 5 years of historical data through the API is IB limitation: https://www.interactivebrokers.com/en/software/api/apiguide/tables/historical_data_limitations.htm
2. Due to different account types of IB (standard is 1 year of historical data), daily data requests are executed year per year for the first time when MultiCharts was run and IB data requested. When you create another chart for another instrument and select the same data range, only 1 data request will be made, as the available historical data range will be defined after the first request is completed.

History
Issue basics
  • Type of issue
    Feature request
  • Category
    Usability
  • Targeted for
    MultiCharts 9.0 (RELEASED)
  • Status
    Released
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (2)
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    Not determined
  • Severity
    Normal
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates