diff --git a/agents/brief.py b/agents/brief.py index b459bd0..f79d221 100644 --- a/agents/brief.py +++ b/agents/brief.py @@ -399,35 +399,42 @@ class BriefAgent: btc_dom = btc_d.get("btc_dominance_pct", 0) rsi = tech.get("rsi", 50) macd_h = tech.get("macd_histogram", 0) + change_4h = tech.get("change_4h", 0) # Signal detection bullish_signals = 0 bearish_signals = 0 - # RSI - if rsi < 30: bullish_signals += 1 - elif rsi > 70: bearish_signals += 1 + # RSI — granular zones + if rsi < 38: bullish_signals += 1 + elif rsi > 62: bearish_signals += 1 - # Funding rate - if funding > 0.01: bearish_signals += 1 # high funding = long squeeze risk - elif funding < -0.01: bullish_signals += 1 + # Funding rate — any positive funding = long pressure + if funding > 0.0001: bearish_signals += 1 + elif funding < -0.0001: bullish_signals += 1 - # Long ratio - if long_ratio > 60: bearish_signals += 1 # over-leveraged longs - elif long_ratio < 40: bullish_signals += 1 + # Long ratio — tighter around 50 + if long_ratio > 53: bearish_signals += 1 + elif long_ratio < 47: bullish_signals += 1 - # Fear&Greed - if fg_class in ["Extreme Fear", "Fear"]: bullish_signals += 1 - elif fg_class in ["Extreme Greed", "Greed"]: bearish_signals += 1 + # Fear&Greed — extreme gets 2x + if fg_class in ["Extreme Fear"]: bullish_signals += 2 + elif fg_class == "Fear": bullish_signals += 1 + elif fg_class == "Greed": bearish_signals += 1 + elif fg_class in ["Extreme Greed"]: bearish_signals += 2 - # MACD histogram - if macd_h > 0: bullish_signals += 1 - elif macd_h < 0: bearish_signals += 1 + # MACD histogram — lower threshold for sensitivity + if macd_h > 5: bullish_signals += 1 + elif macd_h < -5: bearish_signals += 1 - # BTC dominance (high = BTC season, alt risk) + # BTC dominance if btc_dom > 55: bullish_signals += 1 elif btc_dom < 45: bearish_signals += 1 + # Price momentum (4h change) + if change_4h > 1.0: bullish_signals += 1 + elif change_4h < -1.0: bearish_signals += 1 + # Determine signal and confidence net = bullish_signals - bearish_signals if net >= 3: @@ -441,7 +448,6 @@ class BriefAgent: confidence = 40 + abs(net) * 5 # Change-based confirmation - change_4h = tech.get("change_4h", 0) change_24h = tech.get("change_24h", 0) if change_24h > 5 and signal == "NEUTRO": signal = "ALTA"; confidence = min(confidence + 10, 85) diff --git a/agents/decio.py b/agents/decio.py index e8acc16..9d7de11 100644 --- a/agents/decio.py +++ b/agents/decio.py @@ -16,8 +16,8 @@ class DecioAgent: # ── CORE RULE: confidence < 75% → always HOLD ───────────────────────── def _risk_filter(self, confidence, signal): - """Décio is a mathematician: no confidence ≥75%, no operation.""" - return confidence < 75 or signal not in ("ALTA", "BAIXA") + """Décio is a mathematician: no confidence ≥70%, no operation.""" + return confidence < 70 or signal not in ("ALTA", "BAIXA") # ── Stop Loss / Take Profit ──────────────────────────────────────────────── def _calc_levels(self, price, action):