fix(v0.2.5): monotonic loss ratchet + golden session + never-profitable grace

- Fix #3: Grace period capped at 2min for trades that NEVER saw profit
- Fix #4: effective_max_loss and max_atr_loss can only tighten (monotonic)
- Golden Session: loss_mult*0.70, profit_mult*0.85, grace*0.60
- market_context now includes is_golden, session_name, session_volatility
- Enhanced dynamic log with [GOLDEN] tag, ratchet values, ever_profitable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
GifariKemal
2026-02-11 20:30:50 +07:00
co-authored by Claude Opus 4.6
parent 7b751e4c41
commit cd9f58fe82
4 changed files with 94 additions and 4 deletions
+8
View File
@@ -2523,6 +2523,14 @@ class TradingBot:
_market_ctx[col if col != "histogram" else "macd_hist"] = (
vals.tail(1).item() if len(vals) > 0 else None
)
# v0.2.5: Pass session info for Golden Session awareness
try:
_sess = self.session_filter.get_status_report()
_market_ctx["session_name"] = _sess.get("current_session", "")
_market_ctx["is_golden"] = "GOLDEN" in _sess.get("current_session", "").upper()
_market_ctx["session_volatility"] = _sess.get("volatility", "medium")
except Exception:
_market_ctx["is_golden"] = False
# Evaluate with smart risk manager (dynamic thresholds v5)
should_close, reason, message = self.smart_risk.evaluate_position(