How EDISON Works

Understand the architecture, data pipeline, and trading logic behind the EDISON bot

System Architecture

🔗

Data Sources

  • Bybit WebSocket: Real-time candles, orderbook, ticks
  • Bybit REST API: Fallback, historical data, order status
  • SQLite Database: Local candle cache, trading journal
📊

Analysis Engine

  • 30+ Analyzers: Technical analysis, pattern detection
  • Multi-timeframe: 1m, 5m, 15m, 30m, 60m synchronization
  • Smart Money: Liquidity zones, order blocks, divergences
🎯

Signal Generation

  • 13+ Strategies: Independent entry signals
  • Confidence Voting: Weighted consensus system
  • Context Analysis: Market regime validation
🛡️

Execution & Risk

  • Risk Management: SL, TP, leverage limits
  • Order Execution: Real exchange orders via API
  • Position Management: Sync, fills, exits

Data Flow Pipeline

1

WebSocket Connection

Real-time stream from Bybit: OHLCV candles, orderbook updates, and trade ticks

• Candles: 1m, 5m, 15m, 30m, 60m (all timeframes)
• Orderbook: Depth 25-100 levels, 5-second updates
• Ticks: Buy/sell volume, high-frequency (for delta analysis)
2

Data Processing

Store in memory cache and SQLite database for persistence

• LRU cache for fast access
• SQLite for historical data and journal
• Multi-timeframe synchronization
3

Technical Analysis

Calculate indicators and run 30+ market analysis modules

• RSI, EMA, ATR, Bollinger Bands, VWAP, etc.
• Smart Money Concepts: liquidity zones, order blocks, divergences
• Pattern detection: triangles, flags, fractals
4

Strategy Signals

13+ strategies generate independent buy/sell signals with confidence scores

• Each strategy: LONG, SHORT, or HOLD
• Confidence: 0-1 scale (0-100%)
• Strategy-specific parameters and filters
5

Signal Consensus

Weighted voting system to determine final direction and confidence

• Each strategy has a configurable weight
• Vote aggregation: LONG vs SHORT confidence
• Context validation: market regime checks
6

Trade Execution

Calculate position size, place orders on Bybit, and manage risk

• Position sizing: Fixed USDT × dynamic leverage
• SL/TP placement: ATR-based or level-based
• Order types: Market, limit, conditional (for reduce-only)
7

Position Management & Exit

Monitor positions, adjust stops, execute take profits, and track results

• Real-time position sync with Bybit
• Dynamic SL adjustment: breakeven, trailing
• Multi-level TP execution with partial closes
• Trading journal logging (entry, exit, PnL)

Risk Management

🛡️ Position Risk Control

  • Fixed Position Size: 10 USDT base (configurable)
  • Dynamic Leverage: 2-10x based on volatility
  • Max Risk Per Trade: SL distance limits exposure
  • Concurrent Risk Limit: Max simultaneous positions

⚠️ Circuit Breaker System

  • Error Threshold: Stop after 5 consecutive errors
  • Daily Loss Limit: Stop if daily losses exceed threshold
  • Loss Streak: Pause after N consecutive losses
  • Funding Rate Filter: Avoid negative funding trades

Stop-Loss Management

  • ATR-Based: 1.5-2.5x ATR for dynamic stops
  • Session-Based: Different SL for Asia/EU/US sessions
  • Level-Based: Stop at swing points or support
  • Hard Stop: Always executed to limit losses

📈 Take-Profit Strategy

  • Multi-Level: 2-3 TP levels with partial closes
  • Breakeven Move: SL → breakeven after TP1
  • Trailing Stop: Follow price after TP2
  • Structure-Based: TP at resistance levels

Key Components

🧠

Analysis Engine

30+ specialized analyzers for technical analysis, Smart Money Concepts, and pattern recognition

🎯

Strategy Voter

Weighted confidence voting system that aggregates signals from all strategies

💳

Order Manager

Handles order placement, verification, and fill detection on Bybit Futures

📊

Position Tracker

Real-time position sync, monitoring, and lifecycle management

🛑

Risk Manager

Enforces position sizing, stop-loss, take-profit, and circuit breaker rules

📝

Journal Logger

Records all trades with entry/exit details, strategy used, and performance metrics

Ready to Understand the Details?

Explore the documentation for configuration, strategy details, and advanced features.

View Documentation