mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Adding a dataprovider to the strategy before plotting
Fix flake8
This commit is contained in:
parent
d9d999eaea
commit
20e8a29262
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user