Trade journal
@qtrader/trade-journal
Keep a trading journal that actually teaches you something. Log each trade with its setup, thesis, emotions, plan adherence, and mistakes in a CSV, then get a weekly review that finds what is working and what is leaking money by setup, time of day, holding period, emotion, and plan adherence. Not financial advice.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
What it makes
Real output from this kit
- Sample file15 KB, download to openReviewFrom the kit's tests
- Sample file4 KB, download to openReviewFrom the kit's tests
- Sample file6 KB, download to openWeekFrom the kit's tests
How this works
- It is a skill: written instructions Claude reads when your request matches what the skill is for. You do not call it by name; just ask for the task.
- While it works, it reads and changes files in the places it lists, nowhere else.
- It runs these commands on your computer: node scripts/journal.mjs, node scripts/selftest.mjs.
- Nothing runs until you choose to use it, and you can remove it any time.
SKILL.md
Trade journal
A journal only helps if every trade goes in the same way and someone actually reads it on Friday. This kit does both: a strict CSV (journal/trades.csv) written by a script, and a review script that groups the numbers so patterns show up.
It coaches process, not picks. Never suggest what to trade.
Logging a trade
Collect these from the user, asking only for what is missing. Keep it quick: one short message, not a form.
- Required: symbol, side (long/short), qty, entry, opened time (
YYYY-MM-DD HH:MM, exchange local time), setup name. - For closed trades: exit and closed time.
- Strongly encouraged: stop (enables R-multiples), fees, a one-line thesis, emotion at entry and exit (one word: calm, confident, fomo, anxious, bored, revenge...), followed plan (y/n), mistakes (
;-separated:chased;moved stop).
- Required: symbol, side (long/short), qty, entry, opened time (
- Reuse the user's existing setup names exactly (check the journal first). "ORB", "orb", and "opening range breakout" split the stats, so pick one and say which.
Write it with the script, never by hand-editing the CSV (the script validates, quotes, and numbers each row):
node scripts/journal.mjs add --file journal/trades.csv --symbol XYZ --side long --qty 100 --entry 20 --exit 21 --stop 19.5 --fees 1 --opened "2026-11-02 09:40" --closed "2026-11-02 10:10" --setup "opening range breakout" --thesis "Gap held on volume" --emotion-entry calm --emotion-exit satisfied --followed-plan yTo close a trade logged as open, use its id:
node scripts/journal.mjs close --file journal/trades.csv --id 18 --exit 30.90 --closed "2026-11-02 10:05" --emotion-exit relieved- Confirm in one line: "Logged #19: XYZ long 100, +$99 (+2.0R), opening range breakout."
Weekly review
Run for the week (Monday to Friday) or the range the user asks for:
node scripts/journal.mjs review --file journal/trades.csv --from 2026-10-26 --to 2026-10-30 --out out/review-2026-10-30It writes
.md(tables) and.json(all numbers). Groups need at least--min-ntrades (default 3) to count as a pattern.- Also run it for the last 4 to 8 weeks: one week is rarely enough trades. Compare the week to the longer window.
- Check for confounding before you claim a pattern. If every short was a vwap fade, "shorts lose" and "vwap fades lose" are the same finding. If every fomo trade was also off-plan, say so once.
- Write
out/weekly-review-<date>.mdwith the template below and show it.
Review template
# Week of <Mon date>: <one-line verdict>
17 closed | 53% win rate | +$763.40 | +$44.91 per trade | PF 2.54 | Avg 0.54R
## Keep doing
- Opening range breakouts: 8 trades, 75% win rate, +$74 per trade.
## Stop doing
- VWAP fades at midday: 5 trades, 0 wins, -$355. Every one was a short into lunch.
- Off-plan trades: 6 trades, 0 wins, -$377. Three were tagged "chased".
## One rule for next week
- No new entries 10:30 to 14:00 unless it is an A+ setup written in the plan first.
## Questions to watch
- Is the ORB edge only on gap days? Tag gaps next week to find out.
Not financial advice. Small samples: treat these as questions to test, not rules.Guardrails
- Pick at most one new rule per week. More than that does not stick.
- Be direct about losing patterns, kind about the person. Emotions are data, not character flaws.
- Never recommend specific securities or trades, and never present a pattern from fewer than about 20 trades as proven.
- The journal holds personal financial data. Keep it in
journal/, do not paste the whole file into chat, and summarize instead.
README.md
trade-journal
Log every trade in a few seconds, then let a weekly review show you what is working and what is leaking money. Patterns are split by setup, time of day, holding period, emotion at entry, plan adherence, weekday, and side, with win rate, expectancy, profit factor, and average R for each.
Who it is for: active traders who know they should journal and want the Friday review to take five minutes instead of an hour.
Not financial advice. It coaches your process; it never picks trades.
Example
You: "Log it: long 100 XYZ at 20, out at 21 half an hour later, stop was 19.50, ORB, felt calm, stuck to the plan."
Logged #19: XYZ long 100, +$99 (+2.0R), opening range breakout.
You: "Weekly review."
node scripts/journal.mjs review --file examples/trades.csvClosed trades 17 | Win rate 53% | Net P&L $763.40 | Expectancy $44.91 per trade | Profit factor 2.54 | Avg R 0.54
- Setup: "opening range breakout" is your best (8 trades, 75% win rate, $74.30 per trade, $594.40 total).
- Setup: "vwap fade" is costing you (5 trades, 0% win rate, -$71.00 per trade, -$355.00 total).
- Time of day (entry): "midday (10:30-14:00)" is costing you (5 trades, 0% win rate, -$71.00 per trade, -$355.00 total).
- Emotion at entry: "fomo" is costing you (3 trades, 0% win rate, -$51.20 per trade, -$153.60 total).
- Followed plan: "no" is costing you (6 trades, 0% win rate, -$62.77 per trade, -$376.60 total).
- Mistake "chased" appeared on 3 trades totaling -$153.60.
...Claude then turns that into a short review: what to keep, what to stop, and one rule for next week. The example journal is made up.
The journal format
journal/trades.csv:
id,opened_at,closed_at,symbol,side,qty,entry,exit,stop,fees,setup,thesis,emotion_entry,emotion_exit,followed_plan,mistakes,notes- Times are
YYYY-MM-DD HH:MMin exchange local time. A blankclosed_atmeans the trade is still open and is left out of the stats. - P&L = (exit - entry) x qty (reversed for shorts) - fees. R = P&L / (|entry - stop| x qty).
- Time of day buckets: pre-market, open (9:30 to 10:30), midday (10:30 to 14:00), close (14:00 to 16:00), after-hours. Holding buckets: scalp (under 30 minutes), intraday, swing (1 to 5 days), position (over 5 days).
- Text that starts with
=,+, or@is prefixed with'so it cannot run as a spreadsheet formula.
Hand check: trade 1 is long 100 at 50.00, out at 51.20, stop 49.40, fees 1, so P&L = 1.20 x 100 - 1 = 119 and R = 119 / 60 = 1.98. Trade 2 is short 200 at 30.00, out at 30.35, so P&L = -0.35 x 200 - 1 = -71. node scripts/selftest.mjs checks these and the whole example review.
What it can access
- Reads and writes
journal/trades.csv. Writes reviews toout/. - Runs only its own scripts with Node. No network, no broker access, no keys.
Setup
Node 22 or newer. Nothing to install. Your first add creates journal/trades.csv. Already journaling in a spreadsheet? Export it as CSV with the columns above.
Files
- README.md
- SKILL.md
- examples/trades.csv
- kit.json
- scripts/journal.mjs
- scripts/selftest.mjs
Did it work?
0worked for them0did not work
Sign in to say whether it worked for you.
Nobody has said yet. Tried it? Tell the next person.
