Interactive Brokers is one of the most feature-rich brokers available to retail forex traders, but its reporting system — built around the Flex Query framework — requires more setup than a simple MT4 export. This guide walks you through the exact steps to get your IBKR forex trades into PipJournal cleanly, with correct lot sizes and P&L figures.
This guide is written for intermediate traders who are comfortable navigating the IBKR Client Portal. Beginners may want to review the how to journal forex trades guide first.
Step 1: Generate a Flex Query in IBKR
Log in to the IBKR Client Portal at clientportal.ibkr.com. Navigate to Performance & Reports → Flex Queries → Create New Flex Query.
Select Trade Confirmation Flex Query (not the Activity Statement). Give the query a descriptive name such as “PipJournal Forex Export”. Under Sections, enable Trades only — disabling bonds, options, and equity sections keeps the output clean.
Set the Date Range to cover the period you want to import. For an initial setup, use the last 90 days. You can run additional queries for older history later.
Set the output format to CSV — it is easier to inspect and edit than XML if you need to make corrections.
Step 2: Configure the Report Fields
Inside the Trades section, enable the following fields:
| Field | Purpose |
|---|---|
| Symbol | Currency pair (e.g., EUR.USD) |
| Open/CloseIndicator | Whether the trade opens or closes a position |
| Buy/Sell | Trade direction |
| Quantity | Units traded (base currency) |
| TradePrice | Execution price |
| IBCommission | Broker commission in account currency |
| DateTime | Exact timestamp of execution |
| RealizedPL | Closed P&L in account currency |
| CurrencyPrimary | Base currency of the pair |
Remove any fields not listed above. Extra columns do not break the import but create unnecessary noise during the mapping step.
Save the Flex Query. IBKR requires queries to be saved before they can be run.
Step 3: Run and Download the Report
From the Flex Queries list, click Run next to your saved query. Select your date range and click Run again. IBKR generates the file server-side — download will begin within a few seconds.
Open the downloaded CSV in a spreadsheet application (Excel, Google Sheets, or LibreOffice Calc). Before touching anything else, save a backup copy with the filename prefixed with “RAW_” so you always have the original.
Check the row count. A 90-day period for an active trader should produce dozens to hundreds of rows. If you see fewer than 10 rows but know you traded during that window, verify that the Trades section was enabled in the query and that the date range covers trading days, not weekends.
Step 4: Format the File for PipJournal
IBKR reports forex quantities in base currency units. A standard EUR/USD lot (100,000 units) appears as 100000 in the Quantity column. Divide by 100,000 to convert to standard lots, or 10,000 for mini lots. Add a new column called Lots with the formula =Quantity/100000.
IBKR uses the format EUR.USD for symbols. PipJournal expects EURUSD (no separator). Use a find-and-replace to remove all periods from the Symbol column.
Timestamps from IBKR appear in the format YYYY-MM-DD;HH:MM:SS. PipJournal accepts ISO 8601 (YYYY-MM-DDTHH:MM:SS) — replace the semicolon with a “T” using find-and-replace.
Rename the columns to match PipJournal’s import template:
- Symbol → pair
- Buy/Sell → direction
- Lots → lots
- TradePrice → price
- DateTime → openedAt (for opening trades) or closedAt (for closing trades)
- RealizedPL → pnl
- IBCommission → commission
For detailed guidance on pip P&L math per lot size, see how to calculate pip P&L by lot size.
Step 5: Import and Verify in PipJournal
In PipJournal, navigate to Import Trades → CSV Upload. Upload your formatted file. PipJournal will parse each row and display a preview showing pair, direction, lots, open price, and P&L.
Scan the preview for:
- Negative lot sizes (these indicate short trades were exported as negative quantities — PipJournal handles direction via the direction column, so set all lot values to positive)
- Pairs that did not map correctly (typically exotic pairs with three-character codes)
- Commission values in the wrong sign (IBKR reports commissions as negative numbers; PipJournal expects positive values representing cost)
After correcting any issues, confirm the import. Tag your trades by setup type or session using PipJournal’s bulk-tag feature before saving — this makes setup performance analysis far more useful from day one.
Pro Tips
- Run a separate Flex Query for each calendar month rather than one massive export. Smaller files are easier to audit and re-import if something goes wrong.
- IBKR charges a small fee for some account types to access historical data beyond two years. Check your account tier before planning a deep historical import.
- If you trade forex through IBKR’s IDEAL Pro system, your fills may appear as two legs (open + close) on separate rows. Filter by OpenCloseIndicator = “C” to isolate completed trades only.
- IBKR rounds commission to 2 decimal places in exports. For very small lot sizes (0.01 lots), commissions may show as $0.00 — manually enter the actual commission from your trade confirmation email.
- After importing, use PipJournal’s R-multiple calculation feature to retroactively score each trade against your planned stop distance.
Common Mistakes to Avoid
-
Importing open positions as closed trades. IBKR includes open positions in some report types. Filter to only rows where OpenCloseIndicator = “C” before importing — open trades have no realized P&L and will skew your statistics.
-
Forgetting to convert quantity to lots. Importing 100,000 as the lot size instead of 1.0 inflates every P&L figure by 100,000x and makes the analytics meaningless. Always divide the Quantity field before uploading.
-
Duplicating trades from overlapping date ranges. If you run a 90-day query and then later run a 180-day query, the first 90 days will appear twice. Use PipJournal’s duplicate detection on import, or keep a log of which date ranges you have already imported.
-
Ignoring the currency of the commission field. IBKR reports commission in the account base currency. If your account is in EUR and you trade USD pairs, the commission column is in EUR — verify this matches what PipJournal expects before finalizing.
-
Skipping the backup step. Spreadsheet edits are easy to corrupt. Always keep the original RAW_ file so you can start over without re-running the Flex Query.
How PipJournal Helps
PipJournal’s import system is built to handle broker-specific quirks, including the column formats and lot size conventions that IBKR traders encounter. Once your trades are loaded, the analytics dashboard breaks down performance by pair, session, and setup tag — giving you the kind of edge measurement that requires a clean, consistent dataset. The AI behavioral co-pilot surfaces patterns across your import history, such as which session your IBKR commissions most erode your edge, or whether your entry timing on EUR/USD differs from GBP/USD. At $179 one-time, it pays for itself quickly when used consistently alongside a broker like IBKR where trade costs genuinely affect net returns.
People Also Ask
Does Interactive Brokers support direct CSV export for forex trades?
Yes. Through the Flex Query system in the Client Portal, you can export trades as XML or CSV. The CSV format is easier to work with for manual import into PipJournal.
What lot size does IBKR use for forex?
IBKR reports forex quantities in base currency units — for example, 100,000 units for a standard lot on EUR/USD. You will need to convert this to lots (divide by 100,000 for standard, 10,000 for mini) when mapping to PipJournal.
Why are my P&L figures in a different currency?
IBKR settles forex P&L in the quote currency by default. If your account base is USD and you traded EUR/USD, realized P&L appears in USD — which matches PipJournal's expected format.
Can I import historical trades or only recent ones?
Flex Queries support custom date ranges going back as far as your account history. You can import months or years of history in a single file.
What if a trade shows as a partial fill?
IBKR splits partial fills into separate execution rows. Combine these manually into a single trade entry before importing, or import them individually and merge inside PipJournal using the trade grouping feature.