feat(stock): 매매알람 exit_params에 climax 파라미터 중앙화 (climax_vol_x 3.0, climax_close_pct 0.97)
This commit is contained in:
@@ -32,7 +32,8 @@ def current_session(now_kst) -> str:
|
||||
return "closed"
|
||||
|
||||
|
||||
DEFAULT_EXIT_PARAMS = {"stop_pct": 0.08, "take_pct": 0.25, "trailing_pct": 0.10}
|
||||
DEFAULT_EXIT_PARAMS = {"stop_pct": 0.08, "take_pct": 0.25, "trailing_pct": 0.10,
|
||||
"climax_vol_x": 3.0, "climax_close_pct": 0.97}
|
||||
DEFAULT_BUY_PARAMS = {"rsi_oversold": 30, "breakout_vol_mult": 1.5, "pullback_pct": 0.02}
|
||||
|
||||
|
||||
|
||||
@@ -33,3 +33,11 @@ def test_monitor_set_ok(client):
|
||||
assert body["session"] in ("pre", "regular", "after", "closed")
|
||||
assert "buy_targets" in body and "sell_targets" in body
|
||||
assert body["exit_params"]["trailing_pct"] == 0.10
|
||||
|
||||
|
||||
def test_monitor_set_exit_params_include_climax(client):
|
||||
"""climax 파라미터 중앙화 — 워커가 하드코딩 대신 NAS exit_params에서 받아 튜닝."""
|
||||
ep = client.get("/api/webai/trade-alert/monitor-set",
|
||||
headers={"X-WebAI-Key": "k"}).json()["exit_params"]
|
||||
assert ep["climax_vol_x"] == 3.0
|
||||
assert ep["climax_close_pct"] == 0.97
|
||||
|
||||
Reference in New Issue
Block a user