#!/bin/bash # V11 PROGRESSIVE Parameter Sweep Launch Script # Stage 1: Ultra-permissive (start from 0 filters) to find baseline set -e # Exit on error echo "================================================================" echo "V11 PROGRESSIVE PARAMETER SWEEP - STAGE 1" echo "================================================================" echo "" echo "Strategy: Start from 0 (filters disabled) and go upwards" echo "" echo "Progressive Grid (512 combinations):" echo " - flip_threshold: 0.4, 0.5" echo " - adx_min: 0, 5, 10, 15 (0 = disabled)" echo " - long_pos_max: 95, 100 (very loose)" echo " - short_pos_min: 0, 5 (0 = disabled)" echo " - vol_min: 0.0, 0.5 (0 = disabled)" echo " - entry_buffer_atr: 0.0, 0.10 (0 = disabled)" echo " - rsi_long_min: 25, 30 (permissive)" echo " - rsi_short_max: 75, 80 (permissive)" echo "" echo "Expected outcomes:" echo " - adx_min=0 configs: 150-300 signals (almost no filtering)" echo " - adx_min=5 configs: 80-150 signals (light filtering)" echo " - adx_min=10 configs: 40-80 signals (moderate filtering)" echo " - adx_min=15 configs: 10-40 signals (strict filtering)" echo "" echo "If all still 0 signals with adx_min=0:" echo " → Base Money Line calculation is broken (not the filters)" echo "" echo "================================================================" echo "" cd "$(dirname "$0")" # Check if data file exists if [ ! -f "data/solusdt_5m.csv" ]; then echo "✗ Error: data/solusdt_5m.csv not found" echo " Please ensure market data is available" exit 1 fi echo "✓ Market data found" # Check if coordinator script exists if [ ! -f "v11_test_coordinator.py" ]; then echo "✗ Error: v11_test_coordinator.py not found" exit 1 fi echo "✓ Coordinator script found" # Clear previous test data echo "" echo "🗑️ Clearing previous test data..." rm -rf v11_test_results/* if [ -f "exploration.db" ]; then sqlite3 exploration.db "DELETE FROM v11_test_chunks;" 2>/dev/null || true sqlite3 exploration.db "DELETE FROM v11_test_strategies;" 2>/dev/null || true echo "✓ Database cleared" fi # Launch coordinator in background echo "" echo "🚀 Starting progressive sweep coordinator..." nohup python3 v11_test_coordinator.py > coordinator_v11_progressive.log 2>&1 & COORDINATOR_PID=$! echo "✓ Coordinator started (PID: $COORDINATOR_PID)" echo "" echo "================================================================" echo "MONITORING" echo "================================================================" echo "Live log: tail -f coordinator_v11_progressive.log" echo "Database: sqlite3 exploration.db" echo "Results: cluster/v11_test_results/*.csv" echo "" echo "Check status:" echo " sqlite3 exploration.db \"SELECT * FROM v11_test_chunks\"" echo "" echo "Analyze signal distribution by ADX:" echo " sqlite3 exploration.db \\" echo " \"SELECT json_extract(params, '$.adx_min') as adx_min, \\" echo " AVG(total_trades) as avg_signals, COUNT(*) as configs \\" echo " FROM v11_test_strategies \\" echo " GROUP BY adx_min ORDER BY adx_min;\"" echo "" echo "To stop sweep:" echo " kill $COORDINATOR_PID" echo "================================================================"