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{
- 2 "name": "trade-journal",
- 3 "owner": "qtrader",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "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.",
- 7 "category": "trading",
- 8 "license": "MIT",
- 9 "compat": ["claude-code"],
- 10 "permissions": {
- 11 "shell": ["node scripts/journal.mjs", "node scripts/selftest.mjs"],
- 12 "files": { "read": ["./journal/**"], "write": ["./journal/**", "./out/**"] }
- 13 },
- 14 "tests": {
- 15 "cases": [
- 16 {
- 17 "name": "P&L, buckets, patterns, and CSV writing match the hand checks",
- 18 "inputs": {},
- 19 "checks": [{ "type": "command_exits_zero", "command": "node scripts/selftest.mjs" }]
- 20 },
- 21 {
- 22 "name": "weekly review of the example journal finds the edge and the leak",
- 23 "inputs": {},
- 24 "checks": [
- 25 { "type": "command_exits_zero", "command": "node scripts/journal.mjs review --file examples/trades.csv --out out/review" },
- 26 { "type": "file_contains", "path": "out/review.md", "text": "Closed trades 17 | Win rate 53% | Net P&L $763.40" },
- 27 { "type": "file_contains", "path": "out/review.md", "text": "Setup: \"opening range breakout\" is your best" },
- 28 { "type": "file_contains", "path": "out/review.md", "text": "Setup: \"vwap fade\" is costing you" },
- 29 {
- 30 "type": "output_matches_schema",
- 31 "path": "out/review.json",
- 32 "schema": {
- 33 "type": "object",
- 34 "required": ["overall", "groups", "patterns", "open_trades"],
- 35 "properties": {
- 36 "overall": { "type": "object", "properties": { "n": { "const": 17 }, "wins": { "const": 9 } } },
- 37 "open_trades": { "type": "array", "minItems": 1, "maxItems": 1 },
- 38 "patterns": { "type": "array", "minItems": 4 }
- 39 }
- 40 }
- 41 }
- 42 ]
- 43 },
- 44 {
- 45 "name": "logs new trades to a fresh journal and reviews them",
- 46 "inputs": {},
- 47 "checks": [
- 48 {
- 49 "type": "command_exits_zero",
- 50 "command": "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, volume, clean break\" --emotion-entry calm --followed-plan y"
- 51 },
- 52 {
- 53 "type": "command_exits_zero",
- 54 "command": "node scripts/journal.mjs add --file journal/trades.csv --symbol xyz --side short --qty 50 --entry 21.5 --exit 21.9 --stop 22 --opened \"2026-11-02 12:05\" --closed \"2026-11-02 12:30\" --setup \"vwap fade\" --emotion-entry bored --followed-plan n --mistakes \"entered early\""
- 55 },
- 56 { "type": "file_contains", "path": "journal/trades.csv", "text": "\"Gap held, volume, clean break\"" },
- 57 { "type": "command_exits_zero", "command": "node scripts/journal.mjs review --file journal/trades.csv --out out/week" },
- 58 { "type": "file_contains", "path": "out/week.md", "text": "Closed trades 2 | Win rate 50% | Net P&L $79.00" }
- 59 ]
- 60 }
- 61 ]
- 62 }
- 63}
