fix prediction candles updates. fix for trend prediction.
This commit is contained in:
@@ -2571,7 +2571,7 @@ class ChartManager {
|
||||
if (predictions.transformer) {
|
||||
this._addTransformerPrediction(predictions.transformer, predictionShapes, predictionAnnotations);
|
||||
|
||||
// Add trend vector visualization
|
||||
// Add trend vector visualization (shorter projection to avoid zoom issues)
|
||||
if (predictions.transformer.trend_vector) {
|
||||
this._addTrendPrediction(predictions.transformer.trend_vector, predictionShapes, predictionAnnotations);
|
||||
}
|
||||
@@ -2748,9 +2748,12 @@ class ChartManager {
|
||||
|
||||
// Calculate target point
|
||||
// steepness is [0, 1], angle is in degrees
|
||||
// We project ahead by e.g. 5 minutes
|
||||
const projectionMinutes = 5;
|
||||
const targetTime = new Date(lastTimestamp.getTime() + projectionMinutes * 60000);
|
||||
// Project ahead based on timeframe to avoid zoom issues
|
||||
// For 1s: 30s ahead, 1m: 2min ahead, 1h: 30min ahead
|
||||
const projectionSeconds = timeframe === '1s' ? 30 :
|
||||
timeframe === '1m' ? 120 :
|
||||
timeframe === '1h' ? 1800 : 300;
|
||||
const targetTime = new Date(lastTimestamp.getTime() + projectionSeconds * 1000);
|
||||
|
||||
let targetPrice = currentPrice;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user