Debug fix

This commit is contained in:
Harwinder
2026-05-04 20:40:40 -04:00
parent e6ef6e8c9d
commit 8ca59c6a21
4 changed files with 3 additions and 3 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -357,7 +357,7 @@ class ForexDataProvider:
cache_key = f"{symbol}_{timeframe.value}"
self._cache[cache_key] = df
self._cache_timestamps[cache_key] = now
logger.debug(f"Batch cached {len(df)} bars for {td_sym} @ {interval}")
logger.info(f"[live] {td_sym} {interval}: {len(df)} bars, last close={df['Close'].iloc[-1]:.5f}")
except Exception as e:
logger.warning(f"Failed to parse batch data for {td_sym}: {e}")
@@ -426,7 +426,7 @@ class ForexDataProvider:
df = pd.DataFrame(records).set_index("Datetime")
df.index.name = "Datetime"
logger.debug(f"Fetched {len(df)} bars for {td_symbol} @ {interval}")
logger.info(f"[live] {td_symbol} {interval}: {len(df)} bars, last close={df['Close'].iloc[-1]:.5f}")
return df
except (DataUnavailableError, DataIntegrityError):
@@ -479,7 +479,7 @@ class ForexDataProvider:
if std_ret > 0:
outlier_mask = (returns - returns.mean()).abs() > 10 * std_ret
if outlier_mask.any():
logger.warning(f"{symbol}: Removing {outlier_mask.sum()} extreme outlier bars")
logger.debug(f"{symbol}: Removing {outlier_mask.sum()} extreme outlier bars")
df = df[~outlier_mask]
min_required = max(