T live WIP
This commit is contained in:
@@ -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
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user