T09 · Insecure Skill Coding Practices
- Location
trader.py:362- Finding
Declared Live-Trading Risk Controls Are Not Fully Enforced
- Content
View full analysis
tuple[str | None, float, str]: """ Continuation signal after Three White Soldiers or Three Black Crows. Soldiers (UP trend) + next interval < 0.55 -> buy YES (hasn't caught up). Crows (DOWN trend) + next interval > 0.45 -> buy NO (hasn't caught down). """ m = target.market p = target.p q = m.question # Spread gate if m.spread_cents is not None and m.spread_cents / 100 > MAX_SPREAD: return None, 0, f"Spread {m.spread_cents/100:.1%} > {MAX_SPREAD:.1%}" if pattern == "soldiers": lag = 0.55 - p conviction = min(1.0, lag / 0.55) if lag > 0 else 0.05 size = max(MIN_TRADE, round(conviction * MAX_POSITION, 2)) return "yes", size, ( f"3-SOLDIERS -> YES {p:.0%} lag={lag:.0%} size=${size} -- {q[:60]}" ) elif pattern == "crows": lag = p - 0.45 conviction = min(1.0, lag / ...[truncated 3886 chars]- Remediation
View remediation
