I'd like to dump TWS' historical 5min bar data for a bunch of futures contracts to .csv or .xls files or some similar format. Is there an easy way to do this within TWS - perhaps opening a chart and then exporting it or something? Or using some free third party tool? I'm sure it can be done via the API but I'm hoping to avoid that.
Not sure, but I think you can export data with Ninjatrader...and since it's free unless you place live orders, that falls in your price range. Alternatively, you wouldn't have to completely roll your own with the API as you can just tweak the VB.NET demo from TWS. That demo already allows you to submit requests for historic data (with the downloaded data printed out on the screen). All you'd need to do is stick a line or two of code to to open a file and then append data to that file each time a new tick is received (tickPrice event). Also of note, you can do this with the Express versions of Microsoft Visual Studio, so that's also free.
... or you might look into the Excel API demos which also include code to fetch historical data and need only minimal tweeks. Then you have the data in Excel and it's only to do "File Save" to store the .cvs file.
Also a great suggestion. Thanks. Since most of the suggestions boil down to "tackle one of the APIs" I'm just biting the bullet and doing it in the java API. Hasn't been too bad.
My free/open source Ruby interface to TWS, IB-Ruby, includes a utility in the examples/ subdirectory that does exactly this. It's at http://github.com/pjlegato/ib-ruby .
Thought I should reply since I've wasted about an hour trying to get historical stock option data via TWS using NinjaTrader 7. NinjaTrader used to, but no longer supports stock options, as of 2010-August.