fix: allow force-close in trade review and hide strategy nav for intraday
统计核对结果允许强制清仓;日内户顶栏隐藏策略交易与策略交易记录。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user