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
- 1---
- 2name: trade-journal
- 3description: Log trades with setup, thesis, emotions, plan adherence, and mistakes in a CSV journal, and run a weekly review that finds patterns by setup, time of day, holding period, emotion, weekday, and side, with win rate, expectancy, profit factor, and average R. Use when the user says "log this trade", "journal my trade", "I just closed X", "weekly trading review", "what am I doing wrong", "which setups work for me", or "review my journal". Not financial advice.
- 4license: MIT
- 5---
- 7# Trade journal
- 9A 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.
- 11It coaches process, not picks. Never suggest what to trade.
- 13## Logging a trade
- 151. Collect these from the user, asking only for what is missing. Keep it quick: one short message, not a form.
- 16 - **Required:** symbol, side (long/short), qty, entry, opened time (`YYYY-MM-DD HH:MM`, exchange local time), setup name.
- 17 - **For closed trades:** exit and closed time.
- 18 - **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`).
- 192. 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.
- 203. Write it with the script, never by hand-editing the CSV (the script validates, quotes, and numbers each row):
- 22 ```bash
- 23 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 y
- 24 ```
- 26 To close a trade logged as open, use its id:
- 28 ```bash
- 29 node scripts/journal.mjs close --file journal/trades.csv --id 18 --exit 30.90 --closed "2026-11-02 10:05" --emotion-exit relieved
- 30 ```
- 324. Confirm in one line: "Logged #19: XYZ long 100, +$99 (+2.0R), opening range breakout."
- 34## Weekly review
- 361. Run for the week (Monday to Friday) or the range the user asks for:
- 38 ```bash
- 39 node scripts/journal.mjs review --file journal/trades.csv --from 2026-10-26 --to 2026-10-30 --out out/review-2026-10-30
- 40 ```
- 42 It writes `.md` (tables) and `.json` (all numbers). Groups need at least `--min-n` trades (default 3) to count as a pattern.
- 432. Also run it for the last 4 to 8 weeks: one week is rarely enough trades. Compare the week to the longer window.
- 443. **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.
- 454. Write `out/weekly-review-<date>.md` with the template below and show it.
- 47## Review template
- 49```markdown
- 50# Week of <Mon date>: <one-line verdict>
- 5217 closed | 53% win rate | +$763.40 | +$44.91 per trade | PF 2.54 | Avg 0.54R
- 54## Keep doing
- 55- Opening range breakouts: 8 trades, 75% win rate, +$74 per trade.
- 57## Stop doing
- 58- VWAP fades at midday: 5 trades, 0 wins, -$355. Every one was a short into lunch.
- 59- Off-plan trades: 6 trades, 0 wins, -$377. Three were tagged "chased".
- 61## One rule for next week
- 62- No new entries 10:30 to 14:00 unless it is an A+ setup written in the plan first.
- 64## Questions to watch
- 65- Is the ORB edge only on gap days? Tag gaps next week to find out.
- 67Not financial advice. Small samples: treat these as questions to test, not rules.
- 68```
- 70## Guardrails
- 72- Pick at most one new rule per week. More than that does not stick.
- 73- Be direct about losing patterns, kind about the person. Emotions are data, not character flaws.
- 74- Never recommend specific securities or trades, and never present a pattern from fewer than about 20 trades as proven.
- 75- The journal holds personal financial data. Keep it in `journal/`, do not paste the whole file into chat, and summarize instead.
