Add ATM open-offset toggle default off.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -52,6 +52,9 @@ class StrategyEngine:
|
||||
min_opt_lev = self.ledger.get_setting_float(
|
||||
"min_option_leverage", s.min_option_leverage
|
||||
)
|
||||
atm_off_on = self.ledger.get_setting_bool(
|
||||
"atm_open_offset_enabled", s.atm_open_offset_enabled
|
||||
)
|
||||
max_atm_off = self.ledger.get_setting_float(
|
||||
"max_atm_open_offset", s.max_atm_open_offset
|
||||
)
|
||||
@@ -80,6 +83,7 @@ class StrategyEngine:
|
||||
"leverage": leverage,
|
||||
"min_option_hours": min_hours,
|
||||
"min_option_leverage": min_opt_lev,
|
||||
"atm_open_offset_enabled": atm_off_on,
|
||||
"max_atm_open_offset": max_atm_off,
|
||||
"can_open": allow_open,
|
||||
"last_error": last_error,
|
||||
@@ -310,7 +314,7 @@ class StrategyEngine:
|
||||
pick = await get_session().pick_for_open_async()
|
||||
if pick is None:
|
||||
self._set_state(
|
||||
last_error="无合格期权:需剩余时长、ATM开仓偏差与杠杆同时满足"
|
||||
last_error="无合格期权:需剩余时长、杠杆(及已开启的ATM偏差)同时满足"
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user