ghost T predictions plotting on chart live chart updates

This commit is contained in:
Dobromir Popov
2025-11-22 01:14:32 +02:00
parent f967f0a142
commit d349a1bac0
4 changed files with 272 additions and 30 deletions

View File

@@ -576,6 +576,11 @@
// Start polling for signals
startSignalPolling();
// Start chart auto-update
if (window.appState && window.appState.chartManager) {
window.appState.chartManager.startAutoUpdate();
}
const trainingMode = data.training_mode || 'inference-only';
const modeText = trainingMode === 'per-candle' ? ' with per-candle training' :
(trainingMode === 'pivot-based' ? ' with pivot training' : '');
@@ -630,6 +635,11 @@
// Stop polling
stopSignalPolling();
// Stop chart auto-update
if (window.appState && window.appState.chartManager) {
window.appState.chartManager.stopAutoUpdate();
}
currentInferenceId = null;
showSuccess('Real-time inference stopped');
@@ -932,9 +942,16 @@
}
updatePredictionHistory();
// Update chart with signal markers
// Update chart with signal markers and predictions
if (window.appState && window.appState.chartManager) {
displaySignalOnChart(latest);
// Update ghost candles and other predictions
const predictions = {};
const modelKey = latest.model ? latest.model.toLowerCase() : 'transformer';
predictions[modelKey] = latest;
window.appState.chartManager.updatePredictions(predictions);
}
}
})