mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: ensure data type is maintained when data comes from cache.
This commit is contained in:
@@ -113,10 +113,11 @@ def populate_dataframe_with_trades(
|
|||||||
):
|
):
|
||||||
logger.info(f"Using cached orderflow data for {candle_start}")
|
logger.info(f"Using cached orderflow data for {candle_start}")
|
||||||
# Check if the trades are already in the cache
|
# Check if the trades are already in the cache
|
||||||
|
cache_idx = cached_grouped_trades.index[
|
||||||
|
cached_grouped_trades["date"] == candle_start
|
||||||
|
][0]
|
||||||
for col in ADDED_COLUMNS:
|
for col in ADDED_COLUMNS:
|
||||||
dataframe.at[index, col] = cached_grouped_trades.loc[
|
dataframe.at[index, col] = cached_grouped_trades.at[cache_idx, col]
|
||||||
(cached_grouped_trades["date"] == candle_start), col
|
|
||||||
].values
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
dataframe.at[index, "trades"] = trades_grouped_df.drop(
|
dataframe.at[index, "trades"] = trades_grouped_df.drop(
|
||||||
|
|||||||
Reference in New Issue
Block a user