wip
This commit is contained in:
@@ -1902,10 +1902,11 @@ class ChartManager {
|
||||
|
||||
// Add prediction traces (ghost candles)
|
||||
if (predictionTraces.length > 0) {
|
||||
// Remove existing ghost traces first (heuristic: traces with name 'Ghost Prediction')
|
||||
// Remove existing ghost traces safely
|
||||
// We iterate backwards to avoid index shifting issues when deleting
|
||||
const currentTraces = plotElement.data.length;
|
||||
const indicesToRemove = [];
|
||||
for (let i = 0; i < currentTraces; i++) {
|
||||
for (let i = currentTraces - 1; i >= 0; i--) {
|
||||
if (plotElement.data[i].name === 'Ghost Prediction') {
|
||||
indicesToRemove.push(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user