π HARVEST Trading Bot
Created by Gary Richard Doman
Founder of Doman.ai & GareBearEnterprises
Music Producer: TizWildin
Advanced Multi-Timeframe Algorithmic Trading System
π Complete System Documentation
Version 3.3 | December 18, 2024 | Dashboard Enhancements & Status Tracking
π― System Overview
HARVEST is an advanced multi-timeframe algorithmic trading bot that simultaneously trades across 5 different timeframes (1m, 5m, 15m, 1h, 4h) to maximize trading opportunities while maintaining strict risk controls.
The system uses a sophisticated deterministic seed system (similar to Minecraft world generation) where each unique combination of trading parameters generates a reproducible "seed" that produces identical trading behavior. This enables:
- β
Perfect reproducibility - Same seed always produces same trades
- β
37.6 billion tracked combinations - Comprehensive parameter space
- β
4-layer tracking system - Registry, Snapshots, Catalog, Performance
- β
Automatic optimization - Whitelist/blacklist based on performance
- β
Independent per-timeframe - Each timeframe optimized separately
20-40+
Trades Per Day
High Frequency
37.6B
Seed Combinations
Tracked
72%+
Target Win Rate
Per Timeframe
6-Layer
Data Validation
Blockchain Audit
$100 Max
Position Size
Small Account
7 Tiers
Balance-Aware
$10 to $100+
Auto BTC
Wallet Creation
At $20+
π Core Features
Multi-Timeframe Trading
- 1m (Ultra-Fast Scalping) - 30 min max hold, 82% confidence, 10-20 trades/day
- 5m (Fast Scalping) - 1 hour max hold, 80% confidence, 6-12 trades/day
- 15m (Short-Term) - 3 hour max hold, 75% confidence, 3-5 trades/day
- 1h (Medium-Term) - 12 hour max hold, 75% confidence, 1-2 trades/day
- 4h (Long-Term) - 24 hour max hold, 63% confidence, 0-1 trades/day
Seed System & Optimization
- Deterministic Seed Generation - Each parameter combination produces unique reproducible seed
- 4-Layer Tracking - Registry, Snapshots (SHA-256), Catalog, Performance Tracker
- Automatic Whitelist - Seeds with 70%+ WR, positive P&L, 15+ trades
- Automatic Blacklist - Seeds with <55% WR or negative P&L
- Seed Testing Commands - Test all whitelisted or top 10 seeds per timeframe
- BASE_STRATEGY Overwrite - Deploy proven seeds to production
Risk Management & Position Sizing
- Balance-Aware Tiers - Position sizes scale with account balance ($10β$100+)
- Timeframe Multipliers - Each timeframe has unique position sizing:
- 1m: 0.3x base (fast scalping, small positions)
- 5m: 0.5x base (medium scalping)
- 15m: 0.7x base (short-term)
- 1h: 1.0x base (standard medium-term)
- 4h: 1.5x base (larger long-term positions)
- Tier Caps - Max position per asset increases with balance: $10β$15β$16β$18β$20β$100
- Example: At $35 balance (Tier 3), 1h trade = $15 Γ 1.0 = $15, while 1m = $15 Γ 0.3 = $4.50
- Dynamic TP/SL - ATR-based with timeframe-specific multipliers
- Time Limits - Force close after max hold time per timeframe
- Max Concurrent - 2 simultaneous positions across all active timeframes
Advanced Analytics
- 10-Criteria High Accuracy Filter - Multi-factor trade validation
- Reversal Detection - Avoid trades near trend reversals
- Prediction Tracking - Confidence calibration and validation
- Strategy Performance - Real-time win rate and P&L tracking
- Backtest History - Complete audit trail with timestamps
Dashboard & UI
- Terminal Dashboard - Real-time monitoring with 4 panels + status bar
- Seed Status Panel - Shows active seeds for all 5 timeframes, whitelist/blacklist stats
- Bot Status Panel - Balance, active positions with sizes, last trade, P&L tracking
- Performance Panel - Win rate, trade statistics, average position sizes per timeframe
- Wallet & Limits Panel - MetaMask connection, BTC wallet, profit tracking, position size limits
- Status Bar (NEW!) - Real-time command tracking, validation icons (β/β), command history, operation status (βΉοΈ β³ β
β)
- Comprehensive Help Screen (NEW!) - Press H for extensive command reference, status bar guide, tips & tricks
- Interactive Controls - Keyboard commands with immediate feedback and validation
Wallet Management
- MetaMask Integration - Browser-based wallet connection with balance display
- BTC Wallet Generation - Automatic creation with BIP39/BIP44 derivation
- Auto-Funding - Transfer profits to BTC wallet at $100 threshold
- Real-Time Balance - Live ETH balance with USD conversion via Binance API
- Client ID System - Persistent wallet association per user
- Minimum Balance - $10 required for live trading startup
Position Size Limiting
- Small Account Protection - Max $100 per position for accounts < $5,000
- Large Account Scaling - Max 2% of capital per position for accounts β₯ $5,000
- Unified Enforcement - Same limits in backtest and live trading
- Real-Time Display - Dashboard shows current limits and capital status
- Statistics Tracking - Monitor limit application frequency and reductions
Data Validation & Integrity
- 6-Layer Validation - Download β Validate β Blockchain Audit β Fix Corruptions
- Timestamp Integrity - Chronological order, 1-minute intervals, DST detection
- Price Validation - OHLC relationships, range checks, negative value detection
- Gap Detection - Identifies missing candles in 24/7 crypto market
- Blockchain Audit - Cross-validates with actual blockchain timestamps
- Audit Logging - Complete trail of all validation checks with severity levels
- Corruption Repair - Automatic detection with transparent reporting
Statistics Tracking
- Historical Performance - All-time trades, P&L, win rates across all timeframes
- Daily Metrics - Trades per day, daily P&L, session uptime tracking
- Timeframe Analytics - Performance and seed info for each timeframe (1m-4h)
- Session Monitoring - Multiple sessions per day, active trading time
- Best/Worst Days - Automatic tracking of peak and low performance
- Persistent Storage - All statistics saved to JSON with dashboard display
Balance-Aware Trading System (NEW!)
- Stair-Climbing Allocation - Each $10 earned alternates ETHβBTC slot from $10 to $100
- $10: ETH Slot 1 - 1m only, ultra-fast scalping
- $20: BTC Slot 2 - 1m only, dual-asset begins + BTC wallet auto-created
- $30: ETH Slot 3 - 1m+5m unlocked (slots 3-4)
- $40: BTC Slot 4 - 1m+5m active on both assets
- $50: ETH Slot 5 - 1m+5m+15m unlocked (slots 5-6)
- $60: BTC Slot 6 - Short-term timeframes active
- $70: ETH Slot 7 - 1m+5m+15m+1h unlocked (slots 7-8)
- $80: BTC Slot 8 - Medium-term swings added
- $90: ETH Slot 9 - All 5 timeframes unlocked (slots 9-10)
- $100: BTC Slot 10 - FULL BASE SYSTEM (10 slots = 5 TFs Γ 2 assets)
- $110: Position Tier 2 - $10 fee β blockchain confirm β 20 slots (2 per TF per asset)
- $210: Position Tier 3 - $10 fee β blockchain confirm β 30 slots MAXED (3 per TF per asset)
- Backtest Integration - Test any balance:
--balance 35 (4 slots active)
- Note - Founder fees only in live trading; backtests track full profit
ποΈ System Architecture
Seed System (Deterministic)
Layer 1 - Seed Registry (ml/seed_registry.json)
- Complete parameter configurations
- Aggregate statistics across all trades
- Test history and validation records
Layer 2 - Seed Snapshots (ml/seed_snapshots.json)
- SHA-256 hash verification for immutability
- Configuration snapshots with timestamps
- Reproducibility validation
Layer 3 - Seed Catalog (ml/seed_catalog.json)
- Trade-by-trade detailed records
- Daily performance breakdown
- Searchable metadata (seed, timeframe, date, asset)
Layer 4 - Performance Tracker (ml/seed_performance_tracker.json)
- Automatic whitelist/blacklist management
- Real-time performance monitoring
- Separate whitelist and blacklist files
Trading Engine
- ProcessingManager - Coordinates all 5 timeframe strategies
- TimeframeStrategy - Independent strategy per timeframe with unique seed
- StrategyManager - Tracks performance and adapts thresholds
- BacktestEngine - Historical testing with minute-by-minute simulation
Key Commands
Testing & Validation:
python ml/seed_tester.py test-all <1m|5m|15m|1h|4h>
python ml/seed_tester.py test-top10 <timeframe>
python backtest_90_complete.py --test-seeds-file ml/test_top10_15m.json
Strategy Management:
python ml/seed_tester.py overwrite <timeframe> --use-best
python ml/seed_tester.py reset [--timeframe <tf>]
python ml/seed_tester.py status
Backtesting:
python backtest_90_complete.py --seed <number>
python backtest_90_complete.py --balance <amount> (Test specific tier)
python pre_trading_check.py
π° Stair-Climbing Balance Allocation
Every $10 earned unlocks ONE slot, alternating ETHβBTC, with progressive timeframe unlocks. Each slot requires ~$10 capital to trade effectively.
Slot 1: $10 (ETH - Capital Building)
- Active: ETH, 1m timeframe only
- Allocation: Slot 1 of 10 (ETH)
- Position Sizing: 1m trades = $10 Γ 0.3 = $3 positions
- Strategy: Ultra-fast scalping (10-20 trades/day)
- BTC Wallet: Not required
- Goal: Earn $10 to unlock BTC slot 2
Slot 2: $20 (BTC - Dual Asset)
- Active: ETH (slot 1) + BTC (slot 2), 1m only
- Allocation: 2 slots of 10 (ETH, BTC)
- Position Sizing: 1m trades = $10 Γ 0.3 = $3 per asset
- BTC Wallet: π¨ Auto-created on dashboard startup
- Strategy: Diversified scalping across two assets
- Goal: Earn $10 to unlock ETH slot 3 with 5m timeframe
Slots 3-4: $30-40 (5m Timeframe Unlocked)
- Active at $30: ETH slots 1 & 3, BTC slot 2 (3 slots total)
- Active at $40: All 4 slots (ETH: 1,3 | BTC: 2,4)
- Timeframes: 1m + 5m on active assets
- Position Sizing at $40:
- 1m: $10 Γ 0.3 = $3.00
- 5m: $10 Γ 0.5 = $5.00
- Strategy: Fast + medium scalping (16-32 trades/day)
- Goal: Reach $50 to unlock 15m timeframe
Slots 5-6: $50-60 (15m Timeframe Unlocked)
- Active at $50: 5 slots (ETH: 1,3,5 | BTC: 2,4)
- Active at $60: 6 slots (ETH: 1,3,5 | BTC: 2,4,6)
- Timeframes: 1m + 5m + 15m on active assets
- Position Sizing at $60:
- 1m: $10 Γ 0.3 = $3.00
- 5m: $10 Γ 0.5 = $5.00
- 15m: $10 Γ 0.7 = $7.00
- Strategy: Short-term + scalping mix (19-37 trades/day)
- Goal: Reach $70 to unlock 1h timeframe
Slots 7-8: $70-80 (1h Timeframe Unlocked)
- Active at $70: 7 slots (ETH: 1,3,5,7 | BTC: 2,4,6)
- Active at $80: 8 slots (ETH: 1,3,5,7 | BTC: 2,4,6,8)
- Timeframes: 1m + 5m + 15m + 1h on active assets
- Position Sizing at $80:
- 1m: $10 Γ 0.3 = $3.00
- 5m: $10 Γ 0.5 = $5.00
- 15m: $10 Γ 0.7 = $7.00
- 1h: $10 Γ 1.0 = $10.00
- Strategy: Medium-term swings + scalping (21-41 trades/day)
- Goal: Reach $90 to unlock 4h timeframe
Slots 9-10: $90-100 (All Timeframes - Full Base System)
- Active at $90: 9 slots (ETH: 1,3,5,7,9 | BTC: 2,4,6,8)
- Active at $100: 10 slots (ETH: 1,3,5,7,9 | BTC: 2,4,6,8,10) - FULL BASE
- Timeframes: ALL (1m, 5m, 15m, 1h, 4h) on both assets
- Position Sizing at $100:
- 1m: $10 Γ 0.3 = $3.00
- 5m: $10 Γ 0.5 = $5.00
- 15m: $10 Γ 0.7 = $7.00
- 1h: $10 Γ 1.0 = $10.00
- 4h: $10 Γ 1.5 = $15.00
- Strategy: Complete timeframe coverage (22-42 trades/day)
- Next Milestone: At $110, pay $10 founder fee to unlock position tier 2 (20 total slots)
Position Tier 2: $110-209 (20 Slots)
- Activation: At $110, send $10 founder fee to blockchain, wait for confirmation
- Unlock: 2 positions per timeframe per asset (20 total: 5 TFs Γ 2 assets Γ 2)
- Timeframes: All 5 (1m, 5m, 15m, 1h, 4h) on both ETH and BTC
- Position Sizing: Same multipliers (0.3x to 1.5x) but now can run 2 concurrent positions per TF per asset
- Strategy: Increased opportunity capture with multiple positions per timeframe
- Next Milestone: At $210, pay $10 fee to unlock position tier 3 (30 slots - MAXED)
Position Tier 3: $210+ (30 Slots - MAXED)
- Activation: At $210, send $10 founder fee to blockchain, wait for confirmation
- Unlock: 3 positions per timeframe per asset (30 total: 5 TFs Γ 2 assets Γ 3) - MAXED
- Timeframes: All 5 (1m, 5m, 15m, 1h, 4h) on both ETH and BTC
- Position Limit: MAXED - cannot add more position slots
- Scaling: Position sizes grow with balance (2% rule for large accounts)
- Future Fees: $10 at $310, $410, $510... (every $100 profit from baseline)
- Strategy: Maximum opportunity capture, professional-grade system
Key Stair-Climbing Principles
- ETHβBTC Alternation: Every $10 earned alternates asset allocation (slot 1=ETH, 2=BTC, 3=ETH...)
- Progressive Timeframe Unlocks: TFs unlock as slots increase (1m at 1-2, +5m at 3-4, +15m at 5-6, +1h at 7-8, +4h at 9-10)
- Slot-Based Capital: Each slot needs ~$10 to trade effectively
- Balance Drops Deactivate Slots: If balance falls below slot threshold, that slot deactivates
- Position Tiers at $100+: After full base system ($100), position capacity scales via founder fee system
- Seed Optimization: Each timeframe uses independently tested seeds for best performance
Testing Slot Allocation
Backtest specific balances to see slot allocation in action:
python backtest_90_complete.py --balance 10 (1 slot: ETH, 1m only)
python backtest_90_complete.py --balance 25 (2 slots: ETH+BTC, 1m only)
python backtest_90_complete.py --balance 35 (4 slots: ETH 1,3 + BTC 2,4, 1m+5m)
python backtest_90_complete.py --balance 55 (6 slots: 1m+5m+15m active)
python backtest_90_complete.py --balance 75 (8 slots: 1m+5m+15m+1h)
python backtest_90_complete.py --balance 100 (10 slots: Full base system, all TFs)
python backtest_90_complete.py --balance 150 (Tier 2: 20 position slots)
python backtest_90_complete.py --balance 250 (Tier 3: 30 position slots MAXED)
View slot allocation details:
python core/balance_aware_strategy.py
π 48-Hour Paper Trading Requirement
β οΈ MANDATORY: Before live trading, you MUST complete 48 hours of verified paper trading with positive P&L.
Requirements
- Duration: Minimum 48 continuous hours (2 full days)
- Minimum Trades: At least 1 successful trade
- Profitability: Total P&L > $0.00 (must overcome setup fees)
- Data Integrity: Session survives restarts, only clears on manual reset
Fee Structure (Based on Slot Allocation)
$100 Starting Balance (10 slots - Full Base System):
- Setup Fees: $2.00 total
- ETHβBTC Conversion (1%): $0.50 (on $50 BTC funding)
- BTC Transfer Fee (2%): $1.00 (on $50 BTC funding)
- Gas Fee: $0.50
- Per Trade: $0.50 gas fee (every trade)
- Starting P&L: -$2.00 (must overcome to be profitable)
$20 Starting Balance (2 slots):
- Setup Fees: $0.40 (fund $10 to BTC slot 2)
- Per Trade: $0.50 gas fee
$10 Starting Balance (1 slot - ETH only):
- Setup Fees: $0.00 (no BTC funding needed)
- Per Trade: $0.50 gas fee
Dashboard Integration
Paper trading status shows in real-time on dashboard status bar:
- Running:
π Paper: [ββββββββββ] 25% 12.0/48h β’ 5T β’ +$1.25
- Requirements Met:
π Paper: READY [100%] β’ 10T β’ +$5.00
- Completed:
π’ Live: APPROVED β’ 48h β’ 15T β’ +$8.50 (permanent)
Commands
Start Paper Trading:
python3 run_paper_trading.py (interactive menu)
python3 run_paper_trading.py --monitor (live monitoring)
python3 test_paper_trading_live.py (automated test)
Check Status:
python3 run_paper_trading.py --stats
python3 pre_trading_check.py --live (validate for live trading)
Complete Session:
python3 run_paper_trading.py --complete
Reset (Start Over):
python3 run_paper_trading.py --reset (type 'RESET' to confirm)
Key Points
- β
Session persists across dashboard/terminal restarts
- β
Real-time updates every 10 seconds in dashboard
- β
All fee calculations transparent (gross β fees β net)
- β
Progress bar shows percentage to 48 hours
- β
Only manual reset clears the session
- β οΈ Must complete before
pre_trading_check.py --live approves
- π΄ Live trading blocked until requirements met
π Documentation
π± Seed System Deep Dive
NEW! Comprehensive guide to the deterministic seed system. Learn how 37.6B combinations are tracked, tested, and optimized across 4 layers with SHA-256 verification. Includes testing workflows and best practices.
π User Manual
Complete system guide with usage instructions, troubleshooting, and command reference. Start here if you're new to the system.
π’ Mathematics Explained
Mathematical explanations in simple terms with real examples. Learn how win rate, P&L, leverage, position sizing, and all calculations work.
π Tron Blockchain Integration
Future enhancement plans for Tron blockchain integration. Includes technical architecture, timeline, and implementation roadmap.
π Additional Resources
π± Seed Testing Guide
Complete guide to testing seeds, overwriting BASE_STRATEGY, and optimizing performance per timeframe. Includes workflow examples and best practices.
β±οΈ Timeframe Expansion
Details on the new 1m and 5m timeframes. Includes configurations, strategies, performance expectations, and integration guide.
β
Implementation Summary
Complete summary of all features, CLI reference, workflow examples, and verification results. Perfect for understanding what's available.
β‘ Quick Start
1. Run Pre-Flight Check
python pre_trading_check.py
Validates data freshness and system readiness
2. Check System Status
python ml/seed_tester.py status
View current BASE_STRATEGY configuration for all timeframes
3. Run Backtest
python backtest_90_complete.py
Test with all 5 timeframes on 90 days of historical data
NEW: Test specific balance tier: python backtest_90_complete.py --balance 25
Try different tiers ($10, $25, $35, $60, $100) to see position sizing in action
4. Launch Dashboard
./dashboard.sh
NEW! One-command startup: Auto-creates BTC wallet, initializes system, launches dashboard
Alternative: python dashboard/terminal_ui.py --test
Real-time monitoring with 4 panels showing statistics, seeds, and wallet status | Press 'W' to connect MetaMask
5. Download & Validate Data
python archive/utilities/download_90day_data.py
Downloads 90 days of data with 6-layer validation and blockchain audit
6. Connect Wallet
Recommended: Press 'W' in dashboard or run ./dashboard.sh
MetaMask opens in browser, BTC wallet auto-created on first run, linked to your unique client ID
7. Optimize Strategies
python ml/seed_tester.py test-top10 15m
python backtest_90_complete.py --test-seeds-file ml/test_top10_15m.json
python ml/seed_tester.py overwrite 15m --use-best
Test and deploy optimized seeds per timeframe