The maximum history data i can get when connecting to Interactive Brokers is 180 days.
is it possible ( with the help of Interactive Broker-API and AFL ) to get all the available data to feed my Amibroker ?
anyone succeed doing this ?
The maximum history data i can get when connecting to Interactive Brokers is 180 days.
is it possible ( with the help of Interactive Broker-API and AFL ) to get all the available data to feed my Amibroker ?
anyone succeed doing this ?
As you wrote, regular maximum at Interactive Brokers is 180 days1) (less than a year, not 5 years). And it can be retrieved as described in manual
http://www.amibroker.com/guide/h_ib.html
by right click on plugin status:
1) 5 years backfill is only available when you do $10000 per month in commissions, but then using true tick-by-tick feed like IQFeed is really recommended and costs a very small fraction of it.
Tomasz,
I'm connecting to IB but can only seem to get a maximum of 3 days worth of data. Even though I follow the instructions and right click on backfill length and select say 30 days, I still only get 3 days. It doesn't matter whether I select 1, 5, 15 minute or daily candles, it only gives 3 days.
Appreciate if you could assist.
Thanks
https://www.amibroker.com/guide/w_dbsettings.html
- Number of bars to load - defines how many bars should be loaded from external data source and kept in AmiBroker. Examples: 10-years EOD: 2600, 60-days intraday 1-minute: 30000 (approx). This setting has no effect if data source is set to (local).
Hello travick,
The same happens to me.
@Tomasz, Could you correct it? How?
I have LATEST version of TWS and Amibroker 6.00.2. Both in x64.
I tried in (x32, x64), and Windows (7, 10)
Backfill length: 180
And only 18 candles.
Thanks
Hi Alexis913,
Were you able to find a solution? I'm new to Amibroker and using TWS as well, I'm running into the same issue.
Thanks
Cancel that - for the benefit of others who may run into same issue.
Tomasz addresses it in post above dated Dec '17 by right-clicking on the Plugin Status green 'CONN' on the bottom right hand corner and adjusting. I presumed the date adjustment was accessible from the Database settings window as well.
I still do not get how to backfill.
There are 3 bars filled. The backfill length is set to 180 days. When I click to the green bar and choose "Backfill current", it turns teal for an instant and back to green again.
There is a line in the document AmiBroker - IB real time feed :
Note that backfill is in bar interval of 1-minute or less (TWS limitation).
I do not quite understand what it means. Does it mean that it is not possible to backfill for instance hourly data?
Screenshots:
Go to File->Database Settings and make sure you have "Number of bars" large enough to accommodate 180 days * 24 hours per day * 60 minutes in an hour. That is 259200 bars
Did not help.
I am a bit confused about those settings, too.
How to backfill day session hourly data for 180 days?
If I create a database today and want to populate it with historical data of past 180 days, is it backfilling at all?
Alternatively, I could just download the historical data with a Python interface I used some time ago and import it to the AB database, I suppose. But I would be happier to do it in the AB way.
Number of bars depends on both time span (number of days you want to get) AND bar interval.
Use this:
I created a brand new database with the following settings:
Added AAPL and set backfill size to 180 days.
Chose "Backfill current" from the green bar. It instantly went teal, then back to green as described above. The chart area remains black and the Price indicator says "Not enough data available but there are only 2 bars in AAPL".
However, if i move the mouse cursor over the black area, the tooltip shows some prices (definitely more than 2). I have no idea how that comes.
Not sure IB supports 1h. Did you try 1 minute like Tomasz said?
I would assume the available data points from looking at Amibroker instructions are second, minute and daily.
IB surely supports 1 hour: TWS API v9.72+: Historical Bar Data
Yes, I tried 1 minute without much success either. Will retry tomorrow.
You should use 1-minute base interval as mentioned earlier. This allows to access ANY other N-minute interval (including hourly) in AmIBroker because AmiBroker would compress data on the fly.
Thanks, it worked that way!
@Tomasz
Well in my experience with compressing 5min (or 1min does not matter) bars to hourly bars, there may be complications. For instance if you are trading two stocks with different 5min bars as their data because they belong to different exchanges, when you compress this into hourly bars, AB may provide you two separate hourly bars in CBT because intervals compressed are not identical.
Therefore, to mitigate this I trade 1 hourly bars with 1 hourly data and do not compress 1min/5min into hourly bars.
Of course this is a non-issue if your portfolio of stocks are all from same exchange say S&P500 so they have the exact intraday bars to be compressed into 1 hourly bars.
Just something to note while trading a diverse portfolio and compressing 1min bars to hourly.
Many thanks,
AD
If you have data holes/misalignment you should simply use "Pad and align" option in Analysis. Also you have to use correct settings in Tools->Preferences, "Intraday", Time stamp of compressed bars shows: START time of interval That is default and highly recommended setting (don't change it).
Manual backfill (clicking on the symbol and waiting for backfill) succeeds but I am having trouble with bulk backfill.
I added a csv list of symbols to the the same database I used with the successful experiment with AAPL above and to the RT quote window and clicked "Backfill All RT quote window symbols". It started backfilling them one by one and I went outside. After return I discovered that none of the symbols presumably backfilled had any bars. If I clik to the symbol in the Symbols window, the Chart tells me that "Not enough data available", etc.
Is it possible to log that process? I would like to see log lines like "AAPL backfill finished OK Aug 13 2021 3:00 pm, 259200 bars filled" or something similar to pin down what should be present and what not.
84 symbols backfilled so far during the next try. I sincerely hope that my previous post is an user error.