stock-trade-journal

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

stock-trade-journal

stock-trade-journal

固定存储位置

Fixed Storage Locations

  • results/trade-journal/records/<TS_CODE>.md
  • results/trade-journal/db/trades.db
  • results/trade-journal/records/<TS_CODE>.md
  • results/trade-journal/db/trades.db

执行规则

Execution Rules

  1. 每次交易动作都记录(买/卖/加/减)。
  2. 同时写 Markdown + SQLite(双写)。
  3. Markdown 按个股持续追加,数据库用于后续统计计算。
  1. Record every trading action (buy/sell/add/reduce).
  2. Write to both Markdown and SQLite (dual write).
  3. Append continuously to Markdown by individual stock, and use the database for subsequent statistical calculations.

命令模板

Command Template

bash
python3 scripts/record_trade.py \
  --workspace ~/.openclaw/workspace \
  --ts-code 603067.SH --side SELL --price 44.1 --quantity 2900 \
  --position-before 36900 --position-after 34000 \
  --reason "压力位先锁利润" --stop-loss 37.2 --take-profit "45.5分批"
bash
python3 scripts/record_trade.py \
  --workspace ~/.openclaw/workspace \
  --ts-code 603067.SH --side SELL --price 44.1 --quantity 2900 \
  --position-before 36900 --position-after 34000 \
  --reason "Lock profits at resistance level first" --stop-loss 37.2 --take-profit "Batch at 45.5"