fix: set 1-day range for backtest (start day before end day)

This commit is contained in:
shokollm
2026-04-10 16:30:22 +00:00
parent 3c8c85aefc
commit 145c6710d1

View File

@@ -23,8 +23,11 @@
// Set max date to yesterday // Set max date to yesterday
const maxDate = yesterday.toISOString().split('T')[0]; const maxDate = yesterday.toISOString().split('T')[0];
// Set end to yesterday, start to day before (1 day range)
endDate = maxDate; endDate = maxDate;
startDate = maxDate; // Same day = 1 day backtest const dayBefore = new Date(yesterday);
dayBefore.setDate(dayBefore.getDate() - 1);
startDate = dayBefore.toISOString().split('T')[0];
if (!$isAuthenticated && !$isLoading) { if (!$isAuthenticated && !$isLoading) {
goto('/login'); goto('/login');