Trader's Second Brain Trader's Second Brain

Import Trades From Any Broker via CSV (Universal Guide)

CSV is the fallback when a broker has no supported sync, but it is not one universal schema. A download may contain orders, fills, closed positions, activity, or market data in CSV, HTML, XLSX, XML, JSON, or another format. This guide shows how to choose the right evidence, preserve the raw file, map only verified meanings, stage the batch, reconcile it, test duplicate handling, and keep a rollback.

Quick Answer

Use a closed-trade, closed-position, execution/fill, trade-confirmation, or scoped activity export—not a watchlist, chart, open-position, or raw-order file. Preserve the original; record account, range, timezone and currency; preview and map according to the source row grain; compare counts, gross P&L, costs and net P&L at the same scope; inspect edge cases; then re-import the exact file to prove it creates no duplicates before accepting the batch.

Your trades · one review system
Import → reconcile → review

Find the leak before the next trade.

Import or log trades. Find setup, session, and behavior leaks.

Find trade leaks →
Trader's Second Brain preview
Reading map

Three checkpoints in this guide

Follow the full walkthrough in order, or jump directly to one of its main sections.

  1. 01Opening checkpointImport Trades From Any Broker: the Safe Four-Step Workflow
  2. 02Middle checkpoint6 CSV Problems and How to Fix Each One
  3. 03Closing checkpointCSV Import Is a Universal Fallback—Not a Universal Schema

Correction and evidence check: September 7, 2026. The previous version said every broker has an export button, promised a two-to-three-minute import, called CSV the safest method, and treated entry/exit columns as universally required. Those claims were too broad. A broker may provide CSV, delimited text, HTML, XLSX, XML, JSON, PDF, or no useful self-service trade file; an export can represent orders, fills, closed positions, cash activity, or market data. This revision keeps the protected title while making “universal” mean a reusable verification workflow—not one file shape that works everywhere.

Import Trades From Any Broker: the Safe Four-Step Workflow

CSV import works when the source file describes completed trading activity and the destination can reconstruct the same trade lifecycle. The safe sequence is export the right report → preserve the original → preview and map in staging → reconcile before accepting. That is the auditable path for replacing manual trade logging; a successful upload message is not enough.

1. Choose the evidence
Prefer Closed Trades, Closed Positions, Trade History, Executions/Fills, Trade Confirmations, or an Activity Statement with realized P&L.
2. Freeze the source
Keep the untouched export, record account, date range, timezone, base currency, and export time, then work from a copy.
3. Map by meaning
Map the broker’s actual row grain and units. Do not infer missing fees, open/close intent, contract multipliers, or timezones.
4. Reconcile and repeat
Compare counts and financial totals at the same scope, inspect edge cases, then re-import the same file to test duplicate control.

Step 1: Find the Export Button (Not Every Broker Calls It Export)

Start in the broker’s History, Reports, Statements, Performance, Activity, Executions, or Trade Confirmations area. Set one account and a closed date range. Desktop or web reporting usually exposes more fields than mobile. If no button is visible, look for a row-menu, download icon, statement generator, or report settings before converting a screen or PDF.

Export candidateUse it?Why
Closed trades / closed positions Usually best Already expresses completed lifecycles and often includes realized P&L.
Executions or fills Good with IDs Most detailed source, but the importer must group partial fills, reversals, and open/close actions correctly.
Activity statement / trade confirmations Good when scoped Can preserve account, currency, commission, and trade identifiers; remove unrelated sections only in a documented working copy.
Order history Usually no May contain pending, cancelled, rejected, or unfilled orders and may not prove a completed trade.
Open positions / holdings No for closed-trade analytics It is a current-state snapshot, not a complete realized history.
Watchlist, chart, candles, or market data No Prices and indicators are not your account executions. A CSV extension does not make them trade history.
Deposits, withdrawals, balance, or tax summary only Companion evidence Useful for reconciliation, but it normally cannot reconstruct entries, exits, or trade grouping by itself.

If you cannot find the download button: confirm you are on desktop/web, expand the relevant history section, widen the date range, and check the broker’s current official reporting help. Ask support for a machine-readable closed-trade or execution history with identifiers, fees, currency, and timestamps. Do not ask only for “a CSV”; that can produce a watchlist, ledger, or order file that cannot be reconciled.

Step 2: Upload to Your Journal—Without Committing Blindly

Keep the original export unchanged. Name the working copy with source, account label, and exact range, such as broker-accountA-closed-2026-08-01_to_2026-08-31.csv. Record the broker timezone and account currency beside it. If a spreadsheet must open the file, disable external content and save any transformation as a new file.

  1. Start with one representative file. Include a small range containing a winner, loser, fee-bearing trade, and—if relevant—a partial close or multi-leg position.
  2. Use preview or a disposable staging account. The importer should show detected source/profile, delimiter, date interpretation, account mapping, and proposed created/skipped/failed groups before the journal becomes authoritative.
  3. Stop on ambiguity. A date such as 04/05/2026, an unlabeled quantity, or P&L without currency cannot be resolved safely from column position alone.
  4. Save evidence. Keep the raw file, mapping version, import result, warning list, and a pre-import journal export so the batch can be reversed.

Privacy correction: choosing a file does not mean the data stays on your computer. A cloud journal normally receives and processes the uploaded contents. Broker exports may contain account identifiers, balances, notes, or personal details. Review the destination’s privacy and deletion terms, remove unrelated sensitive fields in a copy, never include passwords or API secrets, and retain the original privately for reconciliation.

Step 3: Map the Fields (This Is Where Most People Get Stuck)

Column labels are hints, not proof. Amount can mean cash value, quantity, fee, or P&L; Time can mean submission, fill, open, close, or settlement. First declare the row grain—one execution, one order, one closed position, or one round trip—then map each field according to the broker’s documentation and a known trade.

Meaning to preserveCommon source labelsValidation rule
Account identityAccount, Account ID, Login, SubaccountMap to the correct journal account; do not merge accounts merely because currencies match.
Stable identifiersTrade ID, Execution ID, Deal ID, Order ID, Position IDPreserve source-owned IDs and their scope; these are stronger duplicate keys than rounded time and price.
Lifecycle timeOpen/Close Time, Date/Time, Execution TimeIdentify which event each timestamp represents, its offset/timezone, and whether the close-date filter includes the final boundary.
Instrument identitySymbol, Instrument, Pair, Contract, DescriptionPreserve expiry, strike, option type, venue, multiplier, and quote/settlement currency when applicable.
Action and position effectBuy/Sell, Long/Short, Side, Open/Close, BTO/STCA Buy is not always a new long; it can close a short. Use position effect or lifecycle context when available.
Quantity and unitQty, Size, Volume, Lots, ContractsConfirm sign, absolute value, lot size, contract multiplier, and whether a row is a fill or an aggregate.
Execution pricesPrice, Fill Price, Entry, Exit, Average PriceFill rows may have one price; closed-position rows may have entry and exit. Never invent the missing side.
Realized resultRealized P&L, Net P&L, Profit, Closed P/LDetermine whether commission, exchange fees, swap, funding, tax, and currency conversion are included.
Costs and currencyCommission, Fee, Swap, Funding, Currency, AssetKeep sign and currency. Do not add a separately reported fee twice to an already-net result.

CSV itself is only a text container. RFC 4180 documents a common comma-separated shape and quoting rules, but explicitly notes implementation differences; real broker files may use semicolons, tabs, localized decimals, other encodings, extra metadata rows, or multiple tables. Detect the dialect from the untouched file. A global find-and-replace on commas can corrupt both delimiters and quoted numeric values.

Step 4: Review and Confirm

Reconcile at one explicit scope: the same account, close-date interval, timezone, currency, and lifecycle definition. “The totals look close” is not a pass. Differences can be legitimate only when their cause is named—for example, the journal excludes open positions while the statement total includes them.

Minimum acceptance checks
  • Batch accounting: record proposed, created, updated, skipped-as-duplicate, blocked, and failed rows or trade groups.
  • Range boundaries: verify the first and last closed trades and a trade near midnight in the broker timezone.
  • Trade grain: compare execution count only to executions, and closed-position count only to equivalently grouped journal trades.
  • Financial bridge: compare gross P&L, each cost class, and net P&L by account and currency; document every expected difference.
  • Edge sample: inspect long and short, winner and loser, partial fill/close, reversal, multi-leg option, futures multiplier, swap or funding where they exist.
  • Idempotency: upload the exact same file again. It should create no duplicate trade groups, or it should clearly report every repeated group as skipped.
  • Rollback: confirm you can identify and remove this import batch or restore the pre-import journal export without touching later manual notes.

Add strategy, setup, mistake, and review notes after the broker evidence passes. Those fields are editorial/user annotations, not facts to infer from an execution file. If you already uploaded to another journal and now want to fill in strategy, filter the imported batch by stable source IDs, tag it in place, and verify that a future re-import updates or skips those rows rather than replacing the annotations.

Platform-Specific Export Tips

Menus and available formats change. These are the current first-party paths checked September 7, 2026; the linked provider documentation remains the authority for the build and account you use.

MetaTrader 4 / MT4

In Terminal → Account History, choose the required period, then use Save as Report or Save as Detailed Report. MetaTrader’s current help describes HTML output. Keep that original HTML when the destination supports MT4 statements; a spreadsheet conversion can discard structure or silently reformat tickets and timestamps.

MetaTrader 5 / MT5

In the History tab, select the range and use Report from the context menu. The official report structure separates Orders, Deals, Positions, Working Orders, and summary blocks. For a journal, confirm whether its importer expects the complete report, deals, or closed positions—those are different grains. Do not substitute Market Watch or tick-data CSV; that is market data, not account trade history. If you want a recurring closed-trade connection instead of a file backfill, follow the separate MT4/MT5 auto-sync guide and retain the report as reconciliation evidence.

cTrader and TradingView

cTrader documents History → Statement, then Save from the statement page to produce a CSV-formatted spreadsheet. Its history exposes deal and order identifiers, direction, open/close times, prices, and closing quantity. TradingView’s Account Manager can export trading data as CSV, but each selected tab is exported separately. Choose Account history or the exact filled-history surface your importer documents—not chart data, a watchlist, or Strategy Report metrics.

Interactive Brokers (IBKR)

In Client Portal, use Performance & Reports. Activity Statements cover trades and other account activity; Flex Queries let you select sections and fields and output CSV, text, or XML. A Trades-only or Trade Confirmation query is usually easier to map than a multi-section statement, while an Activity query can supply commission and account context. Preserve account ID, currency, date/time, buy/sell, quantity, price, execution/trade/order IDs, and fees when available. TSB also has a separate current IBKR Flex connection path; choose file backfill or connector deliberately rather than mixing them without an overlap test.

NinjaTrader and thinkorswim Desktop

NinjaTrader documents New → Trade Performance; its data grids can be exported to CSV or Excel from the right-click menu. Select the Trades or Executions display that matches your importer—not Historical Data, which is market-price data. thinkorswim’s official help places historical trades under Monitor → Account Statement, where you can set a custom range and inspect Trade History. The old guide’s generic “Activity and Positions → Export” instruction was not specific enough; use the current section’s export action if present in your desktop build, or request a machine-readable trade-history file from Schwab support.

Crypto Exchanges

Exchange exports commonly separate spot, margin, derivatives, closed positions, trades/fills, funding, and account ledgers. Export each relevant market for the same range, validate it separately, and join companion fee/funding data only when the importer explicitly supports that relationship. An order-history file can include unfilled orders; a transaction ledger can include transfers and rewards; neither should be treated automatically as closed trades.

6 CSV Problems and How to Fix Each One

ProblemWhat it usually meansSafe fix
Zero trades or wrong file typeThe file contains orders, holdings, market data, or cash activity instead of completed lifecycles.Return to the provider and export closed trades, closed positions, executions/fills with context, or trade confirmations.
Everything appears in one columnDelimiter, quoting, header, encoding, or metadata rows were detected incorrectly.Inspect the raw copy, choose the actual delimiter/encoding, and preserve quoted commas; do not flatten the file with global replacements.
Dates shift or scrambleDMY/MDY ambiguity, missing timezone, daylight-saving conversion, or the wrong event timestamp.Set the documented source timezone/date order, then verify first/last and a midnight-edge trade against the broker.
P&L or fees disagreeGross was mapped as net, costs were omitted/doubled, currencies were merged, or open P&L entered a realized scope.Build a gross-to-net bridge by cost class and currency. Never force agreement by editing unexplained rows.
Partials or options look duplicatedExecution rows were treated as complete positions, or grouping ignored order/position IDs, expiry, strike, type, or multiplier.Use a supported source profile or an explicit grouping contract; compare both execution count and resulting trade-group count.
A repeated range doubles historyNo stable source ID, wrong ID scope, changed transformation, or importer without idempotent duplicate handling.Stop, roll back the batch, restore the unchanged mapping, and pass an exact same-file re-import test before resuming.

Save Your Mapping for Future Imports

A saved mapping is safe only for the same export schema—not merely the same broker name. Treat it as a small contract:

  • source and account scope;
  • expected header names and file/container type;
  • row grain and grouping IDs;
  • date order, timezone, and daylight-saving rule;
  • quantity units, contract multiplier, currency, and fee sign;
  • whether reported P&L is gross or net;
  • mapping version and last successful reconciliation date.

If the broker adds, removes, or renames columns, routes the same download to another report, or changes timestamp/number formatting, quarantine the next file and revalidate. Automation should fail closed on material schema drift instead of silently reusing an old map.

Grouped Import: Multiple Files at Once

Do not begin by dropping every broker file into one batch. Validate each source separately, then consolidate only after account, currency, timezone, symbol, and trade-grain rules are explicit. Keep a source column and the provider’s original identifiers in the unified journal.

  1. Import source A into staging and reconcile it.
  2. Repeat independently for source B.
  3. Check overlapping accounts and date ranges before combining.
  4. Normalize display labels only after preserving raw symbol/contract identity.
  5. Review analytics per account/currency before using an all-accounts view.

Watchlists, indicators, templates, alerts, and strategy notes are separate migration objects. A trade-history CSV does not move them. Export or rebuild those assets through their own provider-supported paths and keep them out of the trade import batch.

When CSV Is Actually Better Than API—and When It Is Not

CSV/file import is useful for
One-time backfills, migrations, unsupported connectors, reproducible source snapshots, and workflows that do not need an ongoing credential.
A supported connector is useful for
Frequent refresh, provider pagination, stable identifiers, and reduced manual export work—after read-only permissions and reconciliation are proven.
Manual entry is useful for
A tiny number of missing trades or qualitative plan/review fields that the broker never recorded. It should be labeled as manual evidence.

No method is automatically safer or more accurate. A file avoids a persistent broker connection, but the upload still exposes its contents to the journal’s processing environment. An API can be scoped read-only, but its retention, pagination, lifecycle, and fee coverage still require testing. Choose the method that produces the most complete, explainable, and reversible record for your source.

Where Trader’s Second Brain Fits in the Import Workflow

Trader’s Second Brain is our product. The current local TSB source registry recognizes 330 broker and platform import profiles across named exports and other trade-ingestion paths. TSB currently accepts supported CSV, TSV, XLSX, XML, JSON, and HTML files; it can detect common columns, ask for ambiguous date interpretation, preserve account mappings, skip recognized duplicates, and block files that do not contain sufficient trade-lifecycle data. Exact coverage varies by source, file version, market, and export shape, so “recognized” is not a promise that every file from that brand will import perfectly.

For an unlisted or changed format, test one representative closed-trade export before moving the full history. Keep the broker statement as authority, inspect created/skipped/failed groups, and report the file shape when mapping fails. TSB’s analytics and prop-rule tools only become useful after the imported account, dates, fees, and realized P&L reconcile; they do not make incomplete source data complete or guarantee trading outcomes.

Check the exact source before moving history

Use the live source directory to identify file upload, report import, supported sync, or a testing-only path, then validate one batch.

Check My Import Source

Inspect the import demo and validation flow.

How We Built This Guide

Provider-specific paths below are based on current first-party documentation; the cross-provider mapping and reconciliation rules are an editorial synthesis of those report shapes plus TSB’s local importer registry, public docs, and import QA corpus. They are not a claim that every provider uses the same fields.

Firm/program component: Not applicable. This educational guide explains broker-file ingestion and reconciliation; no exact prop firm or challenge program participates in the decision. A generic reference to prop accounts does not supply a valid firm_slug, program_id, region, account size, or phase for a canonical server-rendered card.

The guide retains Article and BreadcrumbList through the server-rendered layout. Its platform examples are not a visible ranking, so it adds no ItemList, Review, Rating, or Product schema.

CSV Import Is a Universal Fallback—Not a Universal Schema

The durable method is not “upload and hope.” Export the report that proves completed trades, preserve the raw evidence, declare the row grain and units, map only known meanings, reconcile counts and money at the same scope, test duplicates, and keep a batch rollback. If any one of those steps fails, stop before using the journal’s win rate, expectancy, drawdown, or prop-rule output.

Igor Manuilov
Written and reviewed by
Igor Manuilov
Founder of Trader's Second Brain · Trader since 2014
Editorial accountability

Trader since 2014. Built Trader's Second Brain to make execution review more evidence-based and less dependent on memory, scattered spreadsheets, or vague journaling.

Your trades · one review system
Import → reconcile → review

Your trade history already knows what to fix next.

Import or log trades. Find setup, session, and behavior leaks.

Find trade leaks →
Trader's Second Brain preview

Frequently Asked Questions

Quick answers to the most common questions about CSV Import Guide.

There is no universal list across journal tools. CSV is common, while some destinations also accept TSV, XLSX, XML, JSON, or HTML reports. TSB currently documents supported CSV, TSV, XLSX, XML, JSON, and HTML upload paths. Check the exact destination and source profile before converting a broker file.

Map by meaning, not label alone. First declare whether one row is an execution, order, closed position, or round trip. Then verify account, stable IDs, event timestamps and timezone, symbol/contract identity, position effect, quantity units, prices, realized P&L, fee treatment, and currency against a known broker trade. Save the mapping only for that exact export schema.

Use a cadence that keeps the journal useful without creating overlapping, unreconciled batches. Daily can suit same-day review; weekly can suit a weekly process; a one-time backfill can cover history. Each batch still needs a named account/range, reconciliation, duplicate test, and rollback evidence—there is no universal two-minute schedule.

Only as far back as the provider makes reliable data available for that account and report. Export history in bounded ranges, validate one representative batch first, and record any retention gap. Do not call the journal complete unless the broker range, account scope, first/last trades, and financial totals reconcile.

Preserve provider-owned execution, trade, order, and position IDs with their account/source scope. After the first staged import, upload the exact same file again: it should create no new trade groups or clearly report all repeats as skipped. Timestamp-plus-price matching is weaker and can collide or change after formatting.

A file avoids an ongoing broker connection, but a cloud journal still receives and processes what you upload. Exports can contain account IDs, balances, notes, or personal data. Review the destination's privacy and deletion terms, remove unrelated sensitive fields in a working copy, never include credentials, and keep the untouched original privately for reconciliation.

Only when the source preserves enough identity and the importer documents the lifecycle. Verify execution/order/position IDs, open-or-close effect, expiry, strike, call/put, quantity, multiplier, fees, and grouping. Compare execution count and resulting position/trade-group count; never assume nearby timestamps prove one multi-leg strategy.

Use the original HTML when the destination explicitly supports that provider's statement. MT4 documents HTML account-history reports, and MT5 documents a structured trading report. A generic HTML-to-CSV conversion can lose sections, IDs, or number/date meaning, so transform only a copy and reconcile it against the original.