Interactive Brokers - File Import from IB (.txt format)
Posted by Henry Gage on 13 March 2011 05:28 PM
File Import from IB (.txt format)|
Here is a sample from the file:
ClientAccountID Symbol Description Date/Time Exchange Buy/Sell Quantity Price Amount Commission
U527508 DRN DIREXION DAILY REAL EST-BULL "2011-03-10, 10:54:19" ISLAND BUY 100 62.2 6220 -1
We noticed the brokerage has changed the file. To import this file requires a bit of cleanup resulting in this:
Account Symbol Description Date Ignore Action Quantity Price Ignore Commission
U527508 DRN DIREXION DAILY REAL EST-BULL 3/10/2011 10:54 ISLAND BUY 100 62.2 6220 -1
1. We changed the column headings to clarify the mapping; this is a minor change and saves a mapping step within TA.
a) Change ClientAccountID into Account
b) Changed Date/Time into Date
c) Changed Exchange into Ignore
d) Changed Buy/Sell into Action
e) Changed Amount into Ignore because it does not include commissions so we will let TA calculate the total
2. It is likely the date format is causing an error because it is not standard (has a comma), we changed it using these steps
a) Using Excel we search for commas "," and replaced it with nothing ""
b) Excel then changed the field into a standard date field
3. The file is tab separated.
a) If you already created a profile that is broken then delete is using File/Import/Import Rules (delete the broken profile)
b) In TA use File/Import/Transactions
c) When you get to step "Import Analysis (Data Format Discovery) part 2 of 4)”, remember to select Field Separator as Tab by clicking on the arrow to scroll down the short list of 5 field choices.