feat: Enhance trading system with new e_min_chg_pct parameter and related logic

Changes:
- Introduced the `e_min_chg_pct` parameter to define the minimum price change percentage compared to the previous day's close, enhancing the momentum trading strategy.
- Updated various functions and classes to incorporate this new parameter, ensuring it is utilized in both backtesting and live trading scenarios.
- Improved documentation and comments to clarify the purpose and usage of the new parameter across the codebase.

Impact:
- This addition allows for more precise control over trading conditions, potentially increasing the effectiveness of the momentum strategy while maintaining system integrity and performance.
This commit is contained in:
Your Name
2026-08-01 16:19:24 +09:00
parent 7050f788c5
commit cb7e5037a0
30 changed files with 2206 additions and 253 deletions

View File

@@ -42,6 +42,7 @@ MOMENTUM_CONFIG_KEYS = frozenset({
"MOMENTUM_TRIGGER_REQUIRE_BULL_BAR",
"MOMENTUM_USE_VOL_TRIGGER",
"MOMENTUM_USE_RSI_FILTER",
"MOMENTUM_E_MIN_CHG_PCT",
"MOMENTUM_PATTERN_BREAKOUT",
"MOMENTUM_PATTERN_PULLBACK",
"MOMENTUM_CHASE_LOOKBACK_MIN",
@@ -169,6 +170,8 @@ def params_to_momentum_env_patch(p: Dict[str, Any]) -> Dict[str, str]:
_set("MOMENTUM_VOL_MULT", p["mom_vol_mult"])
if "mom_vol_win" in p:
_set("MOMENTUM_VOL_WIN", p["mom_vol_win"])
if "e_min_chg_pct" in p:
_set("MOMENTUM_E_MIN_CHG_PCT", p["e_min_chg_pct"])
if "mom_time_end_hm" in p:
_set("MOMENTUM_TIME_END_HM", int(float(p["mom_time_end_hm"])))
if "mom_max_from_open_pct" in p: