diff --git a/freqtrade/data/converter.py b/freqtrade/data/converter.py index 4b4c89d08..049c399e4 100644 --- a/freqtrade/data/converter.py +++ b/freqtrade/data/converter.py @@ -122,7 +122,7 @@ def ohlcv_fill_up_missing_data(dataframe: DataFrame, timeframe: str, pair: str) return df -def trim_dataframe(df: DataFrame, timerange, df_date_col: str = 'date', +def trim_dataframe(df: DataFrame, timerange, *, df_date_col: str = 'date', startup_candles: int = 0) -> DataFrame: """ Trim dataframe based on given timerange diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index 7fd20f041..c45a09fbb 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -84,7 +84,7 @@ def init_plotscript(config, markets: List, startup_candles: int = 0): except ValueError as e: raise OperationalException(e) from e if not trades.empty: - trades = trim_dataframe(trades, timerange, 'open_date') + trades = trim_dataframe(trades, timerange, df_date_col='open_date') return {"ohlcv": data, "trades": trades,