diff --git a/freqtrade/data/converter/orderflow.py b/freqtrade/data/converter/orderflow.py index fbc906392..61f846e72 100644 --- a/freqtrade/data/converter/orderflow.py +++ b/freqtrade/data/converter/orderflow.py @@ -39,7 +39,7 @@ def _convert_timeframe_to_pandas_frequency(timeframe: str): def _calculate_ohlcv_candle_start_and_end(df: pd.DataFrame, timeframe: str): - from freqtrade.exchange import timeframe_to_resample_freq, timeframe_to_next_date + from freqtrade.exchange import timeframe_to_next_date, timeframe_to_resample_freq timeframe_frequency = timeframe_to_resample_freq(timeframe) # calculate ohlcv candle start and end diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 3058f5095..f9b393866 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -24,7 +24,6 @@ from freqtrade.constants import (DEFAULT_AMOUNT_RESERVE_PERCENT, DEFAULT_TRADES_ ExchangeConfig, ListPairsWithTimeframes, MakerTaker, OBLiteral, PairWithTimeframe) from freqtrade.data.converter import clean_ohlcv_dataframe, ohlcv_to_dataframe -from freqtrade.data.converter.orderflow import _calculate_ohlcv_candle_start_and_end from freqtrade.data.converter.trade_converter import (trades_df_remove_duplicates, trades_dict_to_list, trades_list_to_df) from freqtrade.enums import OPTIMIZE_MODES, CandleType, MarginMode, PriceType, RunMode, TradingMode @@ -2325,9 +2324,6 @@ class Exchange: first_required_candle_date: Optional[int]) -> DataFrame: # keeping parsed dataframe in cache trades_df = trades_list_to_df(ticks, True) - # keeping last candle time as last refreshed time of the pair - if ticks and cache: - idx = -1 if cache: if (pair, timeframe, c_type) in self._trades: