()
| 252 | } |
| 253 | |
| 254 | function toggleAutoScroll() { |
| 255 | autoScrollEnabled = !autoScrollEnabled; |
| 256 | chart.setOption({ autoScroll: autoScrollEnabled }); |
| 257 | const btn = document.getElementById('autoscroll-btn')!; |
| 258 | btn.textContent = autoScrollEnabled ? '📍 Auto-Scroll: ON' : '📍 Auto-Scroll: OFF'; |
| 259 | btn.classList.toggle('toggle-active', autoScrollEnabled); |
| 260 | } |
| 261 | |
| 262 | /** |
| 263 | * Switch to a different candlestick timeframe. |