A fully autonomous trading system executing Donchian breakout strategies with multi-timeframe confirmation on Coinbase International Exchange perpetual futures. Built for resilience. Hardened in production.
Every trade must pass five independent conditions before entry. No single indicator drives decisions—convergence of signals filters noise from conviction.
Price exceeds 12-bar high/low channel plus ATR buffer, confirming genuine range expansion
Average Directional Index confirms a trending market, filtering out ranging and choppy conditions
Fast EMA(9) and Slow EMA(21) confirm directional bias matches the breakout direction
RSI > 55 for longs, RSI < 45 for shorts—momentum aligns with entry direction
4-hour EMA(55) must align with trade direction—ensures macro trend agreement
Hard bracket order on exchange
Full exit target
50% position closed early
SL moved to entry price
Follows price at 1.5 ATR
Force close stale positions
Every component runs as a managed systemd service with automatic restart, crash monitoring, and real-time alerting. Zero manual intervention required.
Every layer operates independently. A failure in any single layer cannot cascade—the remaining six continue protecting capital.
Hardware stop-loss and take-profit orders live on-exchange. Execute even if the bot is completely offline. The ultimate backstop.
Every position size is clamped so that (size × SL distance) / equity never exceeds 2%. Prevents outsized risk on high-volatility assets.
Breakeven stops, trailing stops, partial profit-taking, and time-based exits run every 60 seconds. 5-attempt retry with exponential backoff on failures.
If the exchange API returns zero positions while the bot tracks active ones, the cycle is skipped entirely. Prevents catastrophic state wipe from transient API glitches.
Products that hit negative R thresholds are automatically paused. Re-reads from disk each cycle so pauses can never be silently overwritten.
7-day average daily volume must exceed $5M, plus a 4-hour short-window check catches faded pump-and-dumps. All checks use USD notional, never raw base units.
Failed close attempts, orphaned positions, and API errors trigger immediate Telegram alerts with priority escalation for human review.
Not a weekend project. This is a production system with 40+ edge cases identified and resolved through live market experience.
Hybrid mode combines core assets with algorithmically discovered trending products. Every candidate must pass ADX/ATR/volume screens AND a mini-backtest before admission.
WebSocket-powered monitoring with live equity, positions, scanner, and trade history. PWA-enabled for mobile home screen installation. 10-second refresh cycle.
Five-condition entry checklist across all universe products. Color-coded signal dots show exactly how close each market is to triggering. Scan on demand or auto-refresh.
Full strategy simulation with realistic fees, slippage, and risk-capped position sizing. Parameter sweep capability for systematic optimization across market regimes.
All state writes use write-to-temp-then-rename with backup files. fcntl advisory locking prevents concurrent read-modify-write races between services. Crash-proof.
When ADX exceeds 40 and signal score is ≥ 3.0, a fourth position slot opens for high-conviction setups. Opportunity capture without sacrificing risk discipline.
Every fix below was discovered through real trading, not theoretical review. The system gets stronger with every edge case encountered.
Designed for unattended operation. The system monitors itself, restarts crashed services, and alerts on anomalies.
# Verify all services with one command $ for s in cb-perp-bot trade-alerts bot-monitor dashboard; do printf '%-20s %s\n' $s $(systemctl is-active $s) done cb-perp-bot active trade-alerts active bot-monitor active dashboard active # Timer-based services universe-updater active # every 2 hours daily-summary active # midnight UTC performance-tracker active # periodic stats