To import tradebook files into a trading journal, download the list of fills from your broker, check it has the columns a journal needs, pair the fills into complete trades, add charges, and then add your plan and notes. The broker's file gives you accurate numbers; the import turns them into trades you can review.
New to journaling? Start with what a trading journal is and how to keep one.
How to import tradebook files in five steps
- 1.Export the tradebook. Download your fills as CSV or XLSX, one segment and one date range at a time. On Zerodha that is Console, then Reports, then Tradebook; the step-by-step guide to downloading your Zerodha tradebook walks through it.
- 2.Check the columns. Confirm the six fields below are there.
- 3.Pair the fills into trades. A trade is one round trip, from opening a position to closing it fully.
- 4.Add charges. The tradebook records fills, not costs.
- 5.Add the plan and notes. Why you took the trade and where your stop was. No broker file holds this.
The tradebook records what you did. An import is finished only when each trade also says what you planned and why.
The columns a tradebook CSV import needs
Whatever the broker, a tradebook CSV import needs six fields on every row. Upstox and Angel One offer similar trade reports under their Reports sections, but header names can differ, so match them by meaning.
| Field | Why the journal needs it | Zerodha column |
|---|---|---|
| Symbol | Which stock or contract | Symbol |
| Time | Orders the fills and measures holding time | Trade Date and Order Execution Time |
| Side | Buy or sell | Trade Type |
| Quantity | How much filled in that row | Quantity |
| Price | The price of that fill | Price |
| Order ID | Groups fills into the order you placed | Order ID |
Segment and Trade ID help too: one keeps equity and F&O apart, the other identifies each fill, which makes duplicates easy to spot. Avoid re-saving the file in a spreadsheet first; it can reformat dates or round a long Order ID, and then fills that belong together stop matching.
Import trades from broker to journal: pairing the fills
The tradebook lists fills, never trades. Here is an illustrative intraday equity trade: one buy order for 300 shares that fills in two parts, closed with two sell orders.
| Row | Side | Quantity | Price | Order |
|---|---|---|---|---|
| 1 | buy | 200 | ₹500.00 | Order 1 |
| 2 | buy | 100 | ₹500.30 | Order 1 |
| 3 | sell | 150 | ₹506.00 | Order 2 |
| 4 | sell | 150 | ₹503.00 | Order 3 |
Four rows, three orders, one trade. The entry cost 200 × ₹500 + 100 × ₹500.30 = ₹1,00,000 + ₹50,030 = ₹1,50,030, an average of ₹1,50,030 ÷ 300 = ₹500.10 a share. The exits brought in 150 × ₹506 + 150 × ₹503 = ₹75,900 + ₹75,450 = ₹1,51,350, an average of ₹1,51,350 ÷ 300 = ₹504.50 a share.
The gross result is ₹1,51,350 minus ₹1,50,030 = ₹1,320. Put the two averages into the free P&L calculator and you get the same: (₹504.50 minus ₹500.10) × 300 = ₹1,320. These figures are made up to show the method, not a result to expect.
The pairing rule is a running quantity: here it goes 200, 300, 150, 0. A trade opens when your position leaves zero and closes when it returns there.
Add charges before you judge a trade
Charges are on your contract notes, not in the tradebook; how to read a contract note line by line shows where each day's total appears.
Over a month they add up. Assume 40 trades with a combined gross profit of ₹5,000 and charges averaging ₹150 a trade. Charges come to 40 × ₹150 = ₹6,000, so the gross profit of ₹5,000 becomes a net loss of ₹1,000. These are assumed figures; your contract notes have the real ones.
Add the plan and notes the file cannot hold
A broker file knows prices and times, not whether a trade was a planned setup or a bored click at 2:45 pm. For each imported trade, add:
- Setup tag: one short label, used the same way every time.
- Planned stop and target: as prices, so you can score the trade in R multiples, the risk-based way to measure results.
- Followed the plan? Yes, partly or no.
- One line of notes: what you saw and how you felt.
Do it within a day or two, while you still remember; a weekly review of your trades depends on these notes.
Common import problems and how to fix them
Partial fills counted as separate trades
Treat every row as a trade and the example above becomes four trades, throwing off your trade count and win rate. Group rows by Order ID, then pair them by running quantity.
Trades from several segments
On Zerodha you pick one segment per download, so an F&O file alone leaves your equity trades out. Download every segment you traded for the same dates and check each one separately.
Duplicate rows from overlapping downloads
Download 1 to 15 March, then 10 to 31 March, and the fills from 10 to 15 March appear twice. Rows sharing a Trade ID, symbol, time and quantity are one fill; keep one. Downloading whole calendar months avoids the overlap.
Positions that open before the file starts
Buy on 28 March, sell on 2 April, import only April, and you get a sell with no matching buy. It could be a short trade or an older position, and only you know which. Import the earlier month too, so the opening fill is there.
Check the import against your broker's P&L report
The broker's P&L report is an independent check. On Zerodha it is Reports, then P&L: realised profit and loss per scrip for a period. If you are unsure which report to open, see which Console report answers which question.
Compare the same segment and dates, and check your broker's help pages for whether the report's figure is before or after charges.
An illustrative reconciliation: your journal shows a gross profit of ₹12,400 for the month, and the P&L report, after charges in this example, shows ₹9,900. Your contract notes total ₹1,700 in charges, and ₹12,400 minus ₹1,700 = ₹10,700, still ₹800 above the report.
Going scrip by scrip, you find an ₹800 winning trade imported twice from overlapping downloads. Remove it, and ₹12,400 minus ₹800 minus ₹1,700 = ₹9,900, an exact match.
If a gap remains, work through the four problems above.
Where to start
Start small: last month, one segment, one file, checked against the P&L report. Pairing by hand works for a handful of trades, but at a hundred fills it becomes a chore you may start skipping. Before you choose, see how a journaling app compares with a spreadsheet journal, feature by feature.
TradeFolie imports the Zerodha tradebook file as-is, XLSX or CSV, pairs the fills into complete trades, and accepts CSV uploads from other brokers. To try it, sign up and upload last month's tradebook, then run the same P&L check.
FAQ
How do I import my tradebook into a trading journal?
Download the tradebook from your broker as CSV or XLSX, one segment at a time, and check it has symbol, time, side, quantity, price and order ID. Import it, pair the fills into complete trades, and add charges and notes. Then check the total against your broker's P&L report.
What columns does a tradebook CSV import need?
At minimum: symbol, trade date and time, side (buy or sell), quantity, price and order ID. Segment and trade ID help too, because they keep segments apart and make duplicate rows easy to find.
Why does my journal P&L not match my broker's P&L report?
Check whether one figure is before charges and the other after, whether a segment is missing, whether overlapping downloads created duplicates, and whether a position opened before your date range. Then compare scrip by scrip until the gap is explained.
This article is for education only and is not investment advice. TradeFolie is not a SEBI-registered investment adviser or research analyst. Trading in equities and derivatives involves risk, including the loss of capital. Please consult a registered professional before making financial decisions.
See these numbers on your own trades.
Import your broker tradebook and TradeFolie builds the journal, the metrics and the behaviour checks for you.
How to Download Your Zerodha Tradebook (and Read It)
A step-by-step guide to downloading your Zerodha tradebook from Console, what each column means, and how to turn raw fills into a trading journal.
Zerodha P&L Report vs Tax P&L: Which One to Use When
Zerodha P&L report, Tax P&L or tradebook? What each Console report answers, and which one to use for your journal, the monthly review and tax filing.
How to Read a Contract Note: Every Charge Explained
How to read a contract note line by line: brokerage, exchange and clearing charges, STT, SEBI fee, stamp duty, GST, and what to carry into your journal.