Vasily.onl 87843a1d35 3. 7 Enhance chart functionality with time range controls and stability improvements
- Updated `app_new.py` to run the application in debug mode for stability.
- Introduced a new time range control panel in `dashboard/components/chart_controls.py`, allowing users to select predefined time ranges and custom date ranges.
- Enhanced chart callbacks in `dashboard/callbacks/charts.py` to handle time range inputs, ensuring accurate market statistics and analysis based on user selections.
- Implemented logic to preserve chart state during updates, preventing resets of zoom/pan settings.
- Updated market statistics display to reflect the selected time range, improving user experience and data relevance.
- Added a clear button for custom date ranges to reset selections easily.
- Enhanced documentation to reflect the new time range features and usage guidelines.
2025-06-05 12:54:41 +08:00
2025-05-29 23:04:08 +08:00
2025-06-04 17:05:39 +08:00
2025-05-29 23:50:41 +08:00
2025-06-04 17:05:39 +08:00

Crypto Trading Bot Platform

A simplified crypto trading bot platform for strategy testing and development. Test multiple trading strategies in parallel using real OKX market data with virtual trading simulation.

Overview

This platform enables rapid strategy testing within 1-2 weeks of development. Built with a monolithic architecture for simplicity, it supports 5-10 concurrent trading bots with real-time monitoring and performance tracking.

Key Features

  • Multi-Bot Management: Run 5-10 trading bots simultaneously with different strategies
  • Real-time Monitoring: Live OHLCV charts with bot trading signals overlay
  • 📊 Modular Chart Layers: Advanced technical analysis with 26+ indicators and strategy presets
  • 🤖 Bot Signal Integration: Real-time bot signal visualization with performance analytics
  • Virtual Trading: Simulation-first approach with realistic fee modeling
  • JSON Configuration: Easy strategy parameter testing without code changes
  • Backtesting Engine: Test strategies on historical market data
  • Crash Recovery: Automatic bot restart and state restoration

Chart System Features

The platform includes a sophisticated modular chart system with:

  • Technical Indicators: 26+ professionally configured indicators (SMA, EMA, Bollinger Bands, RSI, MACD)
  • Strategy Presets: 5 real-world trading strategy templates (EMA crossover, momentum, mean reversion)
  • Bot Integration: Real-time visualization of bot signals, trades, and performance
  • Custom Indicators: User-defined indicators with JSON persistence
  • Validation System: 10+ validation rules with detailed error reporting
  • Modular Architecture: Independently testable chart layers and components

📊 Complete Chart Documentation

Tech Stack

  • Framework: Python 3.10+ with Dash (unified frontend/backend)
  • Database: PostgreSQL with optimized OHLCV data storage
  • Real-time: Redis pub/sub for live updates
  • Package Management: UV
  • Development: Docker for consistent environment

Quick Start

Prerequisites

  • Python 3.10+, Docker, UV package manager

Setup

📖 For detailed setup instructions, see docs/setup.md

Quick setup:

python scripts/dev.py setup        # Setup environment
python scripts/dev.py start        # Start services  
python scripts/dev.py dev-server   # Start with hot reload

Project Structure

├── app.py                   # Main Dash application
├── bot_manager.py          # Bot lifecycle management
├── database/               # PostgreSQL models and connection
├── data/                   # OKX API integration
├── components/             # Dashboard UI components
├── strategies/             # Trading strategy modules
├── config/bot_configs/     # JSON bot configurations
└── docs/                   # Project documentation

Documentation

Configuration Example

Bot configurations use simple JSON files for rapid testing:

{
  "bot_id": "ema_crossover_01",
  "strategy_file": "ema_crossover.json",
  "symbol": "BTC-USDT",
  "virtual_balance": 10000,
  "enabled": true
}

Development Timeline

Target: Functional system within 1-2 weeks

  • Phase 1 (Days 1-5): Database, data collection, basic visualization
  • Phase 2 (Days 6-10): Bot management, backtesting, trading logic
  • Phase 3 (Days 11-14): Testing, optimization, deployment

Contributing

  1. Review architecture documentation for technical approach
  2. Check task list for available work
  3. Follow project coding standards and use UV for dependencies
  4. Update documentation when adding features
Description
No description provided
Readme 5.5 MiB
Languages
Python 98.5%
PLpgSQL 1.4%