From 20e8a29262e190f5be2d5f792a7bbaf03d6a2c73 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste LE STANG Date: Thu, 2 Jul 2020 20:55:16 +0200 Subject: [PATCH] Adding a dataprovider to the strategy before plotting Fix flake8 --- freqtrade/plot/plotting.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index e8b0b4938..db83448c0 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -15,6 +15,7 @@ from freqtrade.exceptions import OperationalException from freqtrade.exchange import timeframe_to_prev_date from freqtrade.misc import pair_to_filename from freqtrade.resolvers import StrategyResolver +from freqtrade.data.dataprovider import DataProvider logger = logging.getLogger(__name__) @@ -474,6 +475,7 @@ def load_and_plot_trades(config: Dict[str, Any]): pair_counter += 1 logger.info("analyse pair %s", pair) + strategy.dp = DataProvider(config, config["exchange"]) df_analyzed = strategy.analyze_ticker(data, {'pair': pair}) trades_pair = trades.loc[trades['pair'] == pair] trades_pair = extract_trades_of_period(df_analyzed, trades_pair)