mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Merge pull request #10640 from TheJoeSchr/fix/plot-orderflow-data-missing
fix: orderflow data was missing for plotting
This commit is contained in:
commit
3c6e2b89a4
|
@ -520,7 +520,7 @@ class DataProvider:
|
||||||
return self._exchange.trades(
|
return self._exchange.trades(
|
||||||
(pair, timeframe or self._config["timeframe"], _candle_type), copy=copy
|
(pair, timeframe or self._config["timeframe"], _candle_type), copy=copy
|
||||||
)
|
)
|
||||||
elif self.runmode in (RunMode.BACKTEST, RunMode.HYPEROPT):
|
else:
|
||||||
data_handler = get_datahandler(
|
data_handler = get_datahandler(
|
||||||
self._config["datadir"], data_format=self._config["dataformat_trades"]
|
self._config["datadir"], data_format=self._config["dataformat_trades"]
|
||||||
)
|
)
|
||||||
|
@ -529,9 +529,6 @@ class DataProvider:
|
||||||
)
|
)
|
||||||
return trades_df
|
return trades_df
|
||||||
|
|
||||||
else:
|
|
||||||
return DataFrame()
|
|
||||||
|
|
||||||
def market(self, pair: str) -> Optional[Dict[str, Any]]:
|
def market(self, pair: str) -> Optional[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Return market data for the pair
|
Return market data for the pair
|
||||||
|
|
|
@ -90,13 +90,6 @@ def test_historic_trades(mocker, default_conf, trades_history_df):
|
||||||
assert isinstance(data, DataFrame)
|
assert isinstance(data, DataFrame)
|
||||||
assert len(data) == len(trades_history_df)
|
assert len(data) == len(trades_history_df)
|
||||||
|
|
||||||
# Random other runmode
|
|
||||||
default_conf["runmode"] = RunMode.UTIL_EXCHANGE
|
|
||||||
dp = DataProvider(default_conf, None)
|
|
||||||
data = dp.trades("UNITTEST/BTC", "5m")
|
|
||||||
assert isinstance(data, DataFrame)
|
|
||||||
assert len(data) == 0
|
|
||||||
|
|
||||||
|
|
||||||
def test_historic_ohlcv_dataformat(mocker, default_conf, ohlcv_history):
|
def test_historic_ohlcv_dataformat(mocker, default_conf, ohlcv_history):
|
||||||
hdf5loadmock = MagicMock(return_value=ohlcv_history)
|
hdf5loadmock = MagicMock(return_value=ohlcv_history)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user