T live WIP

This commit is contained in:
Dobromir Popov
2025-11-22 01:31:42 +02:00
parent a1d3d6a865
commit 21813fbfe3
2 changed files with 35 additions and 26 deletions

View File

@@ -1616,22 +1616,18 @@ class ChartManager {
*/
async recalculatePivots(timeframe, data) {
try {
// Don't recalculate if we don't have enough data
if (data.timestamps.length < 50) return;
console.log(` Recalculating pivots for ${timeframe} with ${data.timestamps.length} candles...`);
// Optimized: Only send symbol and timeframe, backend uses its own data
const response = await fetch('/api/recalculate-pivots', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
symbol: window.appState?.currentSymbol || 'ETH/USDT',
timeframe: timeframe,
timestamps: data.timestamps,
ohlcv: {
open: data.open,
high: data.high,
low: data.low,
close: data.close,
volume: data.volume
}
timeframe: timeframe
})
});