diff --git a/crypto_monitor_binance/app.py b/crypto_monitor_binance/app.py index 120e318..8700d90 100644 --- a/crypto_monitor_binance/app.py +++ b/crypto_monitor_binance/app.py @@ -1615,7 +1615,7 @@ TRADE_COMPLETED_RESULTS = ( TIME_CLOSE_RESULT, ) -REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", TIME_CLOSE_RESULT) +REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", "强制清仓", TIME_CLOSE_RESULT) def parse_dt_for_trading_day(s): @@ -9519,7 +9519,7 @@ def api_trade_record_review_update(): reviewed_pnl_raw = payload.get("reviewed_pnl_amount") if reviewed_result and reviewed_result not in REVIEW_RESULT_OPTIONS: - return jsonify({"ok": False, "msg": "结果仅允许:止盈/止损/保本止盈/移动止盈/手动平仓"}), 400 + return jsonify({"ok": False, "msg": "结果仅允许:" + "/".join(REVIEW_RESULT_OPTIONS)}), 400 try: reviewed_open_dt = datetime.strptime(reviewed_opened_at[:19], "%Y-%m-%d %H:%M:%S") diff --git a/crypto_monitor_gate/app.py b/crypto_monitor_gate/app.py index 5e63b99..17739ff 100644 --- a/crypto_monitor_gate/app.py +++ b/crypto_monitor_gate/app.py @@ -1609,7 +1609,7 @@ TRADE_COMPLETED_RESULTS = ( TIME_CLOSE_RESULT, ) -REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", TIME_CLOSE_RESULT) +REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", "强制清仓", TIME_CLOSE_RESULT) def parse_dt_for_trading_day(s): @@ -9382,7 +9382,7 @@ def api_trade_record_review_update(): reviewed_pnl_raw = payload.get("reviewed_pnl_amount") if reviewed_result and reviewed_result not in REVIEW_RESULT_OPTIONS: - return jsonify({"ok": False, "msg": "结果仅允许:止盈/止损/保本止盈/移动止盈/手动平仓"}), 400 + return jsonify({"ok": False, "msg": "结果仅允许:" + "/".join(REVIEW_RESULT_OPTIONS)}), 400 try: reviewed_open_dt = datetime.strptime(reviewed_opened_at[:19], "%Y-%m-%d %H:%M:%S") diff --git a/crypto_monitor_okx/app.py b/crypto_monitor_okx/app.py index 5f62a67..c953337 100644 --- a/crypto_monitor_okx/app.py +++ b/crypto_monitor_okx/app.py @@ -1594,7 +1594,7 @@ TRADE_COMPLETED_RESULTS = ( TIME_CLOSE_RESULT, ) -REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", TIME_CLOSE_RESULT) +REVIEW_RESULT_OPTIONS = ("止盈", "止损", "保本止盈", "移动止盈", "手动平仓", "强制清仓", TIME_CLOSE_RESULT) def parse_dt_for_trading_day(s): @@ -8902,7 +8902,7 @@ def api_trade_record_review_update(): reviewed_pnl_raw = payload.get("reviewed_pnl_amount") if reviewed_result and reviewed_result not in REVIEW_RESULT_OPTIONS: - return jsonify({"ok": False, "msg": "结果仅允许:止盈/止损/保本止盈/移动止盈/手动平仓"}), 400 + return jsonify({"ok": False, "msg": "结果仅允许:" + "/".join(REVIEW_RESULT_OPTIONS)}), 400 try: reviewed_open_dt = datetime.strptime(reviewed_opened_at[:19], "%Y-%m-%d %H:%M:%S") diff --git a/lib/instance/templates/embed_boot_scripts.html b/lib/instance/templates/embed_boot_scripts.html index bba2645..96c2de4 100644 --- a/lib/instance/templates/embed_boot_scripts.html +++ b/lib/instance/templates/embed_boot_scripts.html @@ -172,7 +172,7 @@ function editTradeRecordReview(t){ if(takeProfit === null) return; const pnl = prompt("最终盈亏(可手工核对后填写)", String(t.pnl_amount ?? "")); if(pnl === null) return; - const result = prompt("结果(止盈/止损/保本止盈/移动止盈/手动平仓/时间平仓)", String(t.result || "")); + const result = prompt("结果(止盈/止损/保本止盈/移动止盈/手动平仓/强制清仓/时间平仓)", String(t.result || "")); if(result === null) return; const note = prompt("备注(可空)", String(t.miss_reason || "")) ?? ""; pickEntryReason().then(function(entryIn){ diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html index f703116..6a37618 100644 --- a/lib/instance/templates/embed_shell.html +++ b/lib/instance/templates/embed_shell.html @@ -50,8 +50,10 @@ diff --git a/lib/instance/templates/index.html b/lib/instance/templates/index.html index efcf2b7..f94dabd 100644 --- a/lib/instance/templates/index.html +++ b/lib/instance/templates/index.html @@ -75,8 +75,10 @@
关键位监控 实盘下单 + {% if not intraday_discipline %} 策略交易 策略交易记录 + {% endif %} 交易记录与复盘 统计分析
@@ -736,7 +738,7 @@ function editTradeRecordReview(t){ if(takeProfit === null) return; const pnl = prompt("最终盈亏(可手工核对后填写)", String(t.pnl_amount ?? "")); if(pnl === null) return; - const result = prompt("结果(止盈/止损/保本止盈/移动止盈/手动平仓/时间平仓)", String(t.result || "")); + const result = prompt("结果(止盈/止损/保本止盈/移动止盈/手动平仓/强制清仓/时间平仓)", String(t.result || "")); if(result === null) return; const note = prompt("备注(可空)", String(t.miss_reason || "")) ?? ""; pickEntryReason().then(function(entryIn){