fix pred candles viz

This commit is contained in:
Dobromir Popov
2025-11-22 16:22:13 +02:00
parent 539bd68110
commit 423132dc8f
5 changed files with 140 additions and 25 deletions

View File

@@ -16,7 +16,7 @@ sys.path.insert(0, str(parent_dir))
from flask import Flask, render_template, request, jsonify, send_file
from dash import Dash, html
import logging
from datetime import datetime
from datetime import datetime, timezone
from typing import Optional, Dict, List, Any
import json
import pandas as pd
@@ -2448,7 +2448,7 @@ class AnnotationDashboard:
return {
'symbol': symbol,
'timeframe': timeframe,
'timestamp': datetime.now().isoformat(),
'timestamp': datetime.now(timezone.utc).isoformat(),
'action': random.choice(['BUY', 'SELL', 'HOLD']),
'confidence': random.uniform(0.6, 0.95),
'predicted_price': candles[-1].get('close', 0) * (1 + random.uniform(-0.01, 0.01)),