What it is
Hydra RR runs two independent executors (LONG and SHORT) against BTC-PERPETUAL.
Each side reads the latest AI_scores row for model 36_combo, then decides whether to add a small unit,
and continuously rebuilds stop-loss + take-profit orders.
Inputs (from database)
AI signals
Uses the most recent probabilities: score_up / score_stay / score_down + the current BTC price.
The executor never “predicts” itself — it only consumes the model output.
Volatility
A rolling volatility multiplier (derived from price range) scales take-profit for a subset of trades,
capped to avoid absurd targets.
Equity & sizing base
The bot periodically recalculates a global LIMIT_POSITION from recent equity history and derives a UNIT_SIZE
as a small fraction of that limit (rounded to clean steps).
Core gates (when it is allowed to trade)
Accuracy floor
If the recent regime accuracy is below a floor, the engine halts (capital protection).
This prevents “death by a thousand trades” during weak regimes.
Signal threshold
Requires score > a threshold (per side). Also skips trading if the model is “too confident” (panic/regime-change guard).
Position-stage rules
Won’t grow past max position. After ~50% of the max size, it refuses to add if doing so would worsen average entry
(rescue mode only: add only when price is favorable vs avg).
Spacing / churn control
Enforces minimum time between adds and minimum % move from last trade / from average entry (scaled by volatility),
so it doesn’t machine-gun trades in chop.
Order construction (risk engine)
Average entry (the “brain”)
Rebuilds avg-entry from the subset of “still active” fills (ignoring fills that should’ve already TP’d),
then writes that state to bot_state_BOTNAME.json.
Stats readers use that file so UI + logs stay consistent.
Stop loss
Places a bounded stop around avg-entry (and can optionally “spread” stops across levels for large positions).
Take profit (hybrid)
Uses a hybrid TP system:
most trades follow a conservative harvest TP,
while a small subset get a volatility-scaled TP (“home-run” allocator).
This keeps the strategy stable while still capturing occasional larger moves.
Replicating Hydra RR
The execution engine is replicable: database feed + a rules-based order placer + risk gates.
The hard part is the model-signal pipeline: collecting custom features, iterating architectures,
re-training, and evaluating across regimes — that’s the ~9 years of work this dashboard represents.
This is an engineering view of a live system. Not investment advice.