mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-09-20 09:31:12 +00:00
fix: copying orderflow dataframe from cache doesn't work
This commit is contained in:
parent
d23c33a47f
commit
ecd2118941
|
@ -111,7 +111,13 @@ def populate_dataframe_with_trades(config, dataframe, trades):
|
|||
# Use caching mechanism
|
||||
if (candle_start, candle_next) in cached_grouped_trades:
|
||||
cache_entry = cached_grouped_trades[(candle_start, candle_next)]
|
||||
dataframe.loc[is_between] = cache_entry
|
||||
# dataframe.loc[is_between] = cache_entry # doesn't take, so we need workaround:
|
||||
# Create a dictionary of the column values to be assigned
|
||||
update_dict = {c: cache_entry[c].iat[0] for c in cache_entry.columns}
|
||||
# Assign the values using the update_dict
|
||||
dataframe.loc[is_between, update_dict.keys()] = pd.DataFrame(
|
||||
[update_dict], index=dataframe.loc[is_between].index
|
||||
)
|
||||
continue
|
||||
|
||||
# Store trades in Series using integer indices
|
||||
|
|
Loading…
Reference in New Issue
Block a user