A Visual Programming Language for Cryptocurrency Trading Strategies on Bybit
Features โข Architecture โข Quick Start โข Documentation โข Contributing
PVE is a sophisticated visual programming platform that enables traders to create, backtest, and deploy cryptocurrency trading strategies using an intuitive node-based editor. Think of it as "Unreal Engine's Blueprint system, but for trading strategies."
- Visual Strategy Creation: Build complex trading logic using drag-and-drop nodes
- Real-time Backtesting: Test strategies on historical data with detailed analytics
- Live Trading Integration: Deploy strategies on Bybit exchange with full automation
- Advanced Analytics: Comprehensive performance metrics and trade analysis
- WebSocket Real-time Data: Live market data and strategy execution monitoring
Create sophisticated trading strategies using our intuitive drag-and-drop interface:
Comprehensive guides and tutorials to master the platform:
- Node-based Editor: Create strategies using 50+ pre-built nodes
- Technical Indicators: RSI, Bollinger Bands, Moving Averages, Supertrend, and more
- Trading Operations: Market/limit orders, position management, risk controls
- Logic Operations: Conditional logic, comparisons, mathematical operations
- Data Access: OHLCV data, volume, custom timeframes
- Notifications: Telegram integration for alerts and trade notifications
- Backtesting Engine: Historical data testing with realistic execution simulation
- Performance Analytics: Sharpe ratio, max drawdown, win rate, PnL analysis
- Strategy Library: Save, load, and share trading strategies
- Template Strategies: Pre-built examples for common trading patterns
- Live Deployment: Seamless transition from backtest to live trading
- Real-time Data: Live market data streaming from Bybit
- Database Integration: PostgreSQL with TimescaleDB for efficient time-series data
- Microservices Architecture: Scalable backend with Docker containerization
- WebSocket Communication: Real-time updates and notifications
- Background Processing: Celery for asynchronous task execution
graph TB
subgraph "Frontend Layer"
A[Vue.js SPA] --> B[Visual Node Editor]
A --> C[Strategy Dashboard]
A --> D[Analytics Interface]
end
subgraph "API Gateway"
E[Flask REST API] --> F[WebSocket Server]
end
subgraph "Core Services"
G[VPL Engine] --> H[Strategy Executor]
I[Bot Manager] --> J[Bybit Integration]
K[Backtest Engine] --> L[Performance Analyzer]
end
subgraph "Data Layer"
M[PostgreSQL + TimescaleDB] --> N[Redis Cache]
O[Market Data Fetcher] --> P[Historical Data]
end
subgraph "External Services"
Q[Bybit Exchange API]
R[Telegram Bot API]
end
A -.-> E
E --> G
G --> I
I --> Q
I --> M
O --> Q
E --> R
- Visual Editor: LiteGraph.js-based node editor for strategy creation
- Dashboard: Real-time monitoring of active strategies and performance
- Authentication: Telegram-based user authentication
- Charts: Advanced trading charts with TradingView-style interface
- VPL Engine: Executes visual programming graphs as trading strategies
- Bot Manager: Manages multiple trading bot instances per user
- API Layer: RESTful endpoints for strategy management and data access
- WebSocket Server: Real-time communication for live updates
- PostgreSQL: User data, strategies, backtest results, bot configurations
- TimescaleDB: Optimized time-series storage for market data
- Redis: Caching, session management, and pub/sub messaging
- Celery: Background task processing for backtests and data fetching
- Bybit API: Live trading execution and market data streaming
- Telegram API: User authentication and trade notifications
- Docker: Containerized deployment with docker-compose
- Docker & Docker Compose (recommended)
- Python 3.10+ (for local development)
- Node.js 18+ (for frontend development)
- PostgreSQL 14+ (if running without Docker)
-
Clone the repository
git clone https://github.com/Yak0vkaSup/pve.git cd pve -
Configure environment variables
cp env.example .env # Edit .env with your configurations (see Configuration section) -
Start the platform
docker-compose up -d
-
Access the application
- Frontend:
http://localhost:3000 - API:
http://localhost:5001 - Database:
localhost:5432
- Frontend:
Copy env.example to .env and configure the following:
# Telegram Bot Token (get from @BotFather)
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
# JWT Secret (generate with: openssl rand -hex 64)
JWT_SECRET=your_secure_jwt_secret
# Bybit API (for live trading)
BYBIT_API_KEY=your_bybit_api_key
BYBIT_API_SECRET=your_bybit_secret# Database
DB_HOST=postgresql
DB_NAME=postgres
DB_USER=postgres
DB_PASSWORD=postgres
# Environment
FLASK_ENV=development
VITE_APP_ENV=devcd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python pve/run.pynpm install
npm run dev- Create Account: Sign in using Telegram authentication
- Visual Strategy Builder: Use the node editor to create your first strategy
- Backtest: Test your strategy on historical data
- Deploy: Connect your Bybit API and deploy live
- Monitor: Track performance in real-time
- OHLCV: Open, High, Low, Close, Volume data access
- Timeframe: Multi-timeframe data support
- Historical: Access to historical market data
- Moving Averages: SMA, EMA, WMA with customizable periods
- RSI: Relative Strength Index with overbought/oversold levels
- Bollinger Bands: Price volatility analysis
- Supertrend: Trend-following indicator
- Custom Indicators: Build your own using mathematical operations
- Create Order: Market and limit order placement
- Modify Order: Update existing orders
- Cancel Order: Order cancellation
- Position Management: Get current positions and PnL
- Risk Management: Stop-loss and take-profit automation
- Comparisons: Greater than, less than, equal to
- Boolean Logic: AND, OR, NOT operations
- Mathematical: Add, subtract, multiply, divide, min, max
- Conditional: If-then-else logic flow
Market Data โ RSI(14) โ Compare(< 30) โ Buy Signal
โ Compare(> 70) โ Sell Signal
Market Data โ Bollinger Bands โ Price Above Upper Band โ Buy
โ Price Below Lower Band โ Sell
pve/
โโโ src/ # Vue.js frontend
โ โโโ components/ # Vue components
โ โโโ stores/ # Pinia state management
โ โโโ views/ # Page components
โโโ backend/
โ โโโ pve/
โ โโโ app/ # Flask application
โ โ โโโ models/ # Database models
โ โ โโโ routes/ # API endpoints
โ โ โโโ vpl/ # Visual programming engine
โ โ โโโ pvebot/ # Trading bot management
โ โโโ config.py # Configuration
โโโ docker-compose.yml # Docker orchestration
โโโ README.md
- Create node logic in
src/components/custom_nodes/ - Register in
src/stores/graph.ts - Add backend processing in
backend/pve/app/vpl/nodes.py
POST /api/telegram-auth- Telegram OAuthGET /api/verify-token- Token verification
GET /api/get-graphs- List user strategiesPOST /api/save-graph- Save strategyPOST /api/run-backtest- Execute backtest
GET /api/get-bots- List user botsPOST /api/create-bot- Deploy new botPOST /api/start-bot- Start bot execution
We welcome contributions! Please see our Contributing Guidelines for details.
- New Trading Indicators: Implement additional technical analysis tools
- Exchange Integrations: Add support for more cryptocurrency exchanges
- UI/UX Improvements: Enhance the visual editor and dashboard
- Performance Optimizations: Improve backtesting speed and accuracy
- Documentation: Improve guides and API documentation
This software is for educational and research purposes only. Trading cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Always do your own research and never invest more than you can afford to lose.
- Past performance does not guarantee future results
- Backtesting may not reflect real market conditions
- Live trading requires careful risk management
- Always test strategies thoroughly before deploying capital
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- LiteGraph.js - Visual programming framework
- Vue.js - Progressive JavaScript framework
- Flask - Python web framework
- Bybit - Cryptocurrency exchange integration
- TimescaleDB - Time-series database
Made with โค๏ธ by the PVE Community
๐ Star us on GitHub โข ๐ Report Issues โข ๐ฌ Join Discussion