fix(risk): allow journal to reduce 4h cooloff to 1h without pending trade id

Hub closes and late journal saves now shorten active manual cooloffs when exit trigger and note are filled in.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-18 16:27:21 +08:00
parent e470c5952f
commit f0a158686e
3 changed files with 130 additions and 7 deletions
+6 -1
View File
@@ -39,10 +39,15 @@
| 第 1 次用户主动平仓 | 默认 **4h** 冷静期 |
| 第 2 次用户主动平仓(同一交易日) | **日冻结** |
| 复盘勾选任意情绪标签 | **日冻结** |
| 复盘:离场=手动平仓 且说明非空 | 将当前冷静期降为 **1h**(须存在 pending 关联交易记录) |
| 复盘:离场=手动平仓 且说明非空 | 将当前冷静期降为 **1h**(须处于手动平仓冷静期中;有 pending 关联交易记录时同样生效 |
情绪标签:怕踏空、报复开仓、盈利飘了、拿不住单、扛单、重仓违规。
**复盘缩短 1h 说明**
- 复盘表单须选 **离场触发 = 手动平仓**,并在 **离场补充** 填写说明(不是下方「备注」栏)。
- 中控全平/实例手动平仓后,只要账户仍在 4h 冷静期内,完成上述复盘即可降为 1h。
- 若在平仓后超过 1h 才复盘,则从复盘保存时刻起再计 1h(不会延长原 4h 窗口)。
## 环境变量
```env