From a5a55d2b4c3dae0660ef3e5ae4cb2f54912e4269 Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Wed, 23 Jul 2025 10:51:09 +0200 Subject: [PATCH] fix: automation v2 now uses selected timeframes instead of hardcoded ones - Added selectedTimeframes validation in UI to require at least one timeframe - Enhanced bot status display to show active timeframes - Added console logging for debugging automation config - Improved user experience with timeframe requirement warnings --- app/automation-v2/page.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/automation-v2/page.js b/app/automation-v2/page.js index 163f445..9ad1997 100644 --- a/app/automation-v2/page.js +++ b/app/automation-v2/page.js @@ -92,6 +92,18 @@ export default function AutomationPageV2() { const handleStart = async () => { setLoading(true) try { + // Ensure we have selectedTimeframes before starting + if (config.selectedTimeframes.length === 0) { + alert('Please select at least one timeframe for analysis') + setLoading(false) + return + } + + console.log('Starting automation with config:', { + ...config, + selectedTimeframes: config.selectedTimeframes + }) + const response = await fetch('/api/automation/start', { method: 'POST', headers: { @@ -294,6 +306,9 @@ export default function AutomationPageV2() { {/* Timeframe Checkboxes */} @@ -483,6 +498,12 @@ export default function AutomationPageV2() { Symbol: {status.symbol} +
+ Timeframes: + + {config.selectedTimeframes.map(tf => timeframes.find(t => t.value === tf)?.label).filter(Boolean).join(', ')} + +
Leverage: {config.maxLeverage}x