Add dual exit modes: fixed USDT or premium multiple.

Net PnL (after estimated close fees) drives auto close; Plan/Settings expose the choice.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 09:17:50 +08:00
parent 9fd2a842af
commit cce26e87b5
13 changed files with 282 additions and 72 deletions
+5 -2
View File
@@ -42,8 +42,11 @@ class Settings(BaseSettings):
max_rounds: int = 3 # 已不再强管控,仅兼容旧字段
open_hhmm: str = "16:00" # 已废弃开仓窗
stop_open_hhmm: str = "08:00" # 已废弃开仓窗
exit_move_points: float = 30.0 # 旧字段,改用 exit_move_pct
exit_move_pct: float = 2.0 # 相对开仓指数波动 % 全平
exit_move_points: float = 30.0 # 旧字段,已废弃
exit_move_pct: float = 2.0 # 旧字段,已废弃(改用净盈利出场)
exit_mode: str = "fixed_usdt" # fixed_usdt | premium_multiple
net_profit_target: float = 15.0 # fixed_usdt:净盈利 ≥ 该值(USDT
premium_exit_multiple: float = 1.0 # premium_multiple:净盈利 ≥ 权利金×倍数
rest_seconds: int = 300
leverage: float = 3.0 # 永续杠杆
min_option_hours: float = 12.0 # 期权最小剩余小时