Fix: Show UTC+1 time on chart and fix indicator redrawing

Changes:
1. UTC+1 Time Display
   - Updated formatDate() to add 1 hour offset for Central European Time (UTC+1)
   - Added timeFormatter to chart timeScale for x-axis labels
   - Both signal display and chart time axis now show UTC+1 time

2. Fix Indicator Redrawing
   - Added missing getActiveIndicators() call in drawIndicatorsOnChart
   - Fixed variable scope issue where activeIndicators wasn't defined
   - Ensures indicators are properly removed and recreated when new candles close
This commit is contained in:
DiTus
2026-03-01 20:17:14 +01:00
parent 9513f5b426
commit 234e293256
2 changed files with 17 additions and 7 deletions

View File

@ -864,9 +864,11 @@ export function drawIndicatorsOnChart() {
const oldestDate = oldestTime ? new Date(oldestTime * 1000).toLocaleDateString() : 'N/A';
const newestDate = newestTime ? new Date(newestTime * 1000).toLocaleDateString() : 'N/A';
console.log(`[Indicators] ========== Redrawing ==========`);
console.log(`[Indicators] ========== Redrawing ==========`);
console.log(`[Indicators] Candles: ${candles.length} | Time range: ${oldestDate} (${oldestTime}) to ${newestDate} (${newestTime})`);
const activeIndicators = getActiveIndicators();
// Remove all existing series
activeIndicators.forEach(ind => {
ind.series?.forEach(s => {