BTC Arena
The Evolution of
Autonomous Trading
14 agents · Live BTC/USDT · Genetic algorithms · Confidence-scaled leverage
Motivation
The Problem
- 01Static strategies fail in volatile markets.
- 02Manual TA is prone to emotional bias.
- 03No single indicator works universally.
- 04High-frequency data requires parallel, non-blocking evaluation.
Approach
Let strategies compete and evolve
GENETIC LOOP
Spawn diverse archetypes
→ Evaluate signals in real-time
→ Rank by live ROI
→ Kill losers (−20% wallet)
→ Mutate winner's DNA ± 15%
→ repeat
Bot Design
Three Archetypes
⚡ Fast ×5
Scalpers
EMA 4–8 / 12–20
RSI 5–9
Up to 10x
3–5 positions
Trades constantly
◆ Medium ×5
Balanced
EMA 8–15 / 25–40
RSI 10–14
Up to 5x
2–3 positions
Mixed signals
🐢 Slow ×4
Swing traders
EMA 20–30 / 50–80
RSI 14–21
Up to 2x
1–2 positions
Needs both signals
Agent Intelligence
Agent DNA
| Parameter | Description | Range |
| trendWeight | EMA crossover signal weight | 0.1 – 1.0 |
| meanRevWeight | RSI mean reversion weight | 0.1 – 1.0 |
| rsiPeriod | RSI lookback length | 5 – 21 |
| emaShort / emaLong | EMA span pair | 4/12 – 30/80 |
| minConfidence | Entry conviction threshold | 0.38 – 0.72 |
| riskFactor | % wallet used as margin | 6% – 35% |
| tpMultiplier / slMultiplier | TP / SL in ATR units | 0.8–8 / 0.5–3.5 |
| maxLeverage | Per-archetype leverage cap | 2x / 5x / 10x |
Risk Management
Confidence-Scaled Leverage
confidence ≥ 0.65 → maxLeverage (up to 10x)
confidence ≥ 0.55 → 5x (or DNA cap)
confidence ≥ 0.45 → 2x
below threshold → 1x
BUDGET SAFETY
maxMargin = wallet / (atrBase × slMultiplier × leverage)
margin = min(wallet × riskFactor, maxMargin)
// SL loss can never exceed available wallet
Genetic Algorithm
Survival of the Fittest
wallet < $800 → isKicked = true
replacement.dna = bestSameArchetype.dna
× (1 ± random × 0.15)
// archetype diversity preserved
// fast bots replaced by fast bots, etc.
Each bot starts with $1,000 virtual capital. Kicked at −20%.
Engineering
Technical Stack
Frontend
Vanilla JS (ES6 modules)
lightweight-charts v4.1.1
Binance WebSocket
Supabase + localStorage
Express static server
Performance
O(1) EMA / RSI updates
Cached ROI per tick
State saved every 30 ticks
Lazy history log rebuild
Exponential WS backoff
What's next
Roadmap
Near-term
MACD + Bollinger Bands
KESt tax receipt (Austrian CGT)
Cross-over breeding (two-parent DNA)
Long-term
Multi-pair (ETH, SOL)
Historical backtesting
Paper trading API