This commit is contained in:
Dobromir Popov
2025-11-22 01:47:53 +02:00
parent 21813fbfe3
commit d4c0483675
4 changed files with 34 additions and 18 deletions

View File

@@ -2579,8 +2579,9 @@ class RealTrainingAdapter:
for tf in ['1s', '1m', '1h', '1d']:
# Get historical data (raw)
# Force refresh for 1s/1m to ensure we have the very latest candle for prediction
# But set persist=False to avoid locking the database with high-frequency writes
refresh = tf in ['1s', '1m']
df = data_provider.get_historical_data(symbol, tf, limit=600, refresh=refresh)
df = data_provider.get_historical_data(symbol, tf, limit=600, refresh=refresh, persist=False)
if df is not None and not df.empty:
# Extract raw arrays
opens = df['open'].values.astype(np.float32)