From 309eebc61ddef51f4d0cd997ea22e89e6b22dcbd Mon Sep 17 00:00:00 2001 From: dekun Date: Thu, 11 Jun 2026 22:28:04 +0800 Subject: [PATCH] feat: add time-close option to journal exit trigger dropdown Co-authored-by: Cursor --- crypto_monitor_binance/app.py | 3 ++- crypto_monitor_binance/templates/index.html | 5 +++-- crypto_monitor_gate/app.py | 3 ++- crypto_monitor_gate/templates/index.html | 5 +++-- crypto_monitor_gate_bot/app.py | 3 ++- crypto_monitor_gate_bot/templates/index.html | 5 +++-- crypto_monitor_okx/app.py | 3 ++- crypto_monitor_okx/templates/index.html | 5 +++-- 8 files changed, 20 insertions(+), 12 deletions(-) diff --git a/crypto_monitor_binance/app.py b/crypto_monitor_binance/app.py index e2b65dd..3bd45b2 100644 --- a/crypto_monitor_binance/app.py +++ b/crypto_monitor_binance/app.py @@ -1014,6 +1014,7 @@ EARLY_EXIT_TRIGGERS = ( "止盈", "保本止盈", "移动止盈", + TIME_CLOSE_RESULT, "手动平仓", "止损", "其他", @@ -1103,7 +1104,7 @@ def ai_extract_journal_from_image(image_b64): - 趋势多头:小分歧低吸入场(左侧),确认条件:二次探底 - 趋势空头:小分歧高吸入场(左侧),确认条件:二次探顶 - 波段单:5m顺势突破,确认条件:2根k线+成交量放大+4h同向+日成交量前20 -6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):保本止盈、移动止盈、手动平仓、止损、其他。 +6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):止盈、保本止盈、移动止盈、时间平仓、手动平仓、止损、其他。 7) 若触发为「手动平仓」,early_exit_note 必须写出图中可见的补充说明;其他触发类型 early_exit_note 留空。 8) 若图中有无法归类的离场说明原文,可放进 early_exit_note,early_exit_trigger 填「其他」或留空。 diff --git a/crypto_monitor_binance/templates/index.html b/crypto_monitor_binance/templates/index.html index bc2d238..8eef9f6 100644 --- a/crypto_monitor_binance/templates/index.html +++ b/crypto_monitor_binance/templates/index.html @@ -652,6 +652,7 @@ + @@ -1243,7 +1244,7 @@ function setJournalField(name, value){ el.value = String(value); } -const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","手动平仓","止损","其他"]); +const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","时间平仓","手动平仓","止损","其他"]); const KEY_ENTRY_REASON_BY_SIGNAL = { "箱体突破": "关键位箱体突破", "收敛突破": "关键位收敛突破", @@ -1378,7 +1379,7 @@ function fillJournalFromTrade(t){ setJournalField("entry_reason_custom", ""); syncJournalEntryReasonOtherUi(); const er = String(t.result || "").trim(); - const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 手动平仓: "手动平仓", 止损: "止损" }; + const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 时间平仓: "时间平仓", 手动平仓: "手动平仓", 止损: "止损" }; if(exitTrigMap[er]) setJournalField("early_exit_trigger", exitTrigMap[er]); const note = `来自交易记录自动填充:${t.symbol || "-"} ${t.direction || "-"} | 入场:${entryPx || "-"} 止损:${slPx || "-"} 止盈:${tpPx || "-"} | 类型:${t.monitor_type || "-"}`; setJournalField("note", note); diff --git a/crypto_monitor_gate/app.py b/crypto_monitor_gate/app.py index 6c03c2a..3a35988 100644 --- a/crypto_monitor_gate/app.py +++ b/crypto_monitor_gate/app.py @@ -1004,6 +1004,7 @@ EARLY_EXIT_TRIGGERS = ( "止盈", "保本止盈", "移动止盈", + TIME_CLOSE_RESULT, "手动平仓", "止损", "其他", @@ -1093,7 +1094,7 @@ def ai_extract_journal_from_image(image_b64): - 趋势多头:小分歧低吸入场(左侧),确认条件:二次探底 - 趋势空头:小分歧高吸入场(左侧),确认条件:二次探顶 - 波段单:5m顺势突破,确认条件:2根k线+成交量放大+4h同向+日成交量前20 -6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):保本止盈、移动止盈、手动平仓、止损、其他。 +6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):止盈、保本止盈、移动止盈、时间平仓、手动平仓、止损、其他。 7) 若触发为「手动平仓」,early_exit_note 必须写出图中可见的补充说明;其他触发类型 early_exit_note 留空。 8) 若图中有无法归类的离场说明原文,可放进 early_exit_note,early_exit_trigger 填「其他」或留空。 diff --git a/crypto_monitor_gate/templates/index.html b/crypto_monitor_gate/templates/index.html index 2428cad..6407b29 100644 --- a/crypto_monitor_gate/templates/index.html +++ b/crypto_monitor_gate/templates/index.html @@ -632,6 +632,7 @@ + @@ -1223,7 +1224,7 @@ function setJournalField(name, value){ el.value = String(value); } -const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","手动平仓","止损","其他"]); +const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","时间平仓","手动平仓","止损","其他"]); const KEY_ENTRY_REASON_BY_SIGNAL = { "箱体突破": "关键位箱体突破", "收敛突破": "关键位收敛突破", @@ -1358,7 +1359,7 @@ function fillJournalFromTrade(t){ setJournalField("entry_reason_custom", ""); syncJournalEntryReasonOtherUi(); const er = String(t.result || "").trim(); - const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 手动平仓: "手动平仓", 止损: "止损" }; + const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 时间平仓: "时间平仓", 手动平仓: "手动平仓", 止损: "止损" }; if(exitTrigMap[er]) setJournalField("early_exit_trigger", exitTrigMap[er]); const note = `来自交易记录自动填充:${t.symbol || "-"} ${t.direction || "-"} | 入场:${entryPx || "-"} 止损:${slPx || "-"} 止盈:${tpPx || "-"} | 类型:${t.monitor_type || "-"}`; setJournalField("note", note); diff --git a/crypto_monitor_gate_bot/app.py b/crypto_monitor_gate_bot/app.py index 36b3efb..b4333d5 100644 --- a/crypto_monitor_gate_bot/app.py +++ b/crypto_monitor_gate_bot/app.py @@ -1004,6 +1004,7 @@ EARLY_EXIT_TRIGGERS = ( "止盈", "保本止盈", "移动止盈", + TIME_CLOSE_RESULT, "手动平仓", "止损", "其他", @@ -1093,7 +1094,7 @@ def ai_extract_journal_from_image(image_b64): - 趋势多头:小分歧低吸入场(左侧),确认条件:二次探底 - 趋势空头:小分歧高吸入场(左侧),确认条件:二次探顶 - 波段单:5m顺势突破,确认条件:2根k线+成交量放大+4h同向+日成交量前20 -6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):保本止盈、移动止盈、手动平仓、止损、其他。 +6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):止盈、保本止盈、移动止盈、时间平仓、手动平仓、止损、其他。 7) 若触发为「手动平仓」,early_exit_note 必须写出图中可见的补充说明;其他触发类型 early_exit_note 留空。 8) 若图中有无法归类的离场说明原文,可放进 early_exit_note,early_exit_trigger 填「其他」或留空。 diff --git a/crypto_monitor_gate_bot/templates/index.html b/crypto_monitor_gate_bot/templates/index.html index 2428cad..6407b29 100644 --- a/crypto_monitor_gate_bot/templates/index.html +++ b/crypto_monitor_gate_bot/templates/index.html @@ -632,6 +632,7 @@ + @@ -1223,7 +1224,7 @@ function setJournalField(name, value){ el.value = String(value); } -const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","手动平仓","止损","其他"]); +const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","时间平仓","手动平仓","止损","其他"]); const KEY_ENTRY_REASON_BY_SIGNAL = { "箱体突破": "关键位箱体突破", "收敛突破": "关键位收敛突破", @@ -1358,7 +1359,7 @@ function fillJournalFromTrade(t){ setJournalField("entry_reason_custom", ""); syncJournalEntryReasonOtherUi(); const er = String(t.result || "").trim(); - const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 手动平仓: "手动平仓", 止损: "止损" }; + const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 时间平仓: "时间平仓", 手动平仓: "手动平仓", 止损: "止损" }; if(exitTrigMap[er]) setJournalField("early_exit_trigger", exitTrigMap[er]); const note = `来自交易记录自动填充:${t.symbol || "-"} ${t.direction || "-"} | 入场:${entryPx || "-"} 止损:${slPx || "-"} 止盈:${tpPx || "-"} | 类型:${t.monitor_type || "-"}`; setJournalField("note", note); diff --git a/crypto_monitor_okx/app.py b/crypto_monitor_okx/app.py index 8ee27b0..aaa83aa 100644 --- a/crypto_monitor_okx/app.py +++ b/crypto_monitor_okx/app.py @@ -1011,6 +1011,7 @@ EARLY_EXIT_TRIGGERS = ( "止盈", "保本止盈", "移动止盈", + TIME_CLOSE_RESULT, "手动平仓", "止损", "其他", @@ -1087,7 +1088,7 @@ def ai_extract_journal_from_image(image_b64): - 趋势多头:小分歧低吸入场(左侧),确认条件:二次探底 - 趋势空头:小分歧高吸入场(左侧),确认条件:二次探顶 - 波段单:5m顺势突破,确认条件:2根k线+成交量放大+4h同向+日成交量前20 -6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):保本止盈、移动止盈、手动平仓、止损、其他。 +6) early_exit_trigger 只能从下列取值中选一个(无法识别则填空字符串):止盈、保本止盈、移动止盈、时间平仓、手动平仓、止损、其他。 7) 若触发为「手动平仓」,early_exit_note 必须写出图中可见的补充说明;其他触发类型 early_exit_note 留空。 8) 若图中有无法归类的离场说明原文,可放进 early_exit_note,early_exit_trigger 填「其他」或留空。 diff --git a/crypto_monitor_okx/templates/index.html b/crypto_monitor_okx/templates/index.html index ff6e79e..7fc200c 100644 --- a/crypto_monitor_okx/templates/index.html +++ b/crypto_monitor_okx/templates/index.html @@ -661,6 +661,7 @@ + @@ -1252,7 +1253,7 @@ function setJournalField(name, value){ el.value = String(value); } -const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","手动平仓","止损","其他"]); +const EARLY_EXIT_TRIGGERS = new Set(["止盈","保本止盈","移动止盈","时间平仓","手动平仓","止损","其他"]); const KEY_ENTRY_REASON_BY_SIGNAL = { "箱体突破": "关键位箱体突破", "收敛突破": "关键位收敛突破", @@ -1387,7 +1388,7 @@ function fillJournalFromTrade(t){ setJournalField("entry_reason_custom", ""); syncJournalEntryReasonOtherUi(); const er = String(t.result || "").trim(); - const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 手动平仓: "手动平仓", 止损: "止损" }; + const exitTrigMap = { 止盈: "止盈", 保本止盈: "保本止盈", 移动止盈: "移动止盈", 时间平仓: "时间平仓", 手动平仓: "手动平仓", 止损: "止损" }; if(exitTrigMap[er]) setJournalField("early_exit_trigger", exitTrigMap[er]); const note = `来自交易记录自动填充:${t.symbol || "-"} ${t.direction || "-"} | 入场:${entryPx || "-"} 止损:${slPx || "-"} 止盈:${tpPx || "-"} | 类型:${t.monitor_type || "-"}`; setJournalField("note", note);