Skip to content

Commit

Permalink
Update converter.py, revert random formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJoeSchr committed Aug 18, 2023
1 parent b3b4ed7 commit 137ee07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions freqtrade/data/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,7 @@ def ohlcv_fill_up_missing_data(dataframe: DataFrame, timeframe: str, pair: str)
df.reset_index(inplace=True)
len_before = len(dataframe)
len_after = len(df)
pct_missing = (len_after - len_before) / \
len_before if len_before > 0 else 0
pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0
if len_before != len_after:
message = (f"Missing data fillup for {pair}: before: {len_before} - after: {len_after}"
f" - {pct_missing:.2%}")
Expand Down Expand Up @@ -505,8 +504,7 @@ def trim_dataframes(preprocessed: Dict[str, DataFrame], timerange,
processed: Dict[str, DataFrame] = {}

for pair, df in preprocessed.items():
trimed_df = trim_dataframe(
df, timerange, startup_candles=startup_candles)
trimed_df = trim_dataframe(df, timerange, startup_candles=startup_candles)
if not trimed_df.empty:
processed[pair] = trimed_df
else:
Expand Down

0 comments on commit 137ee07

Please sign in to comment.