From 6d8252e2b67855c9abe6b11644e93c476d65fdcb Mon Sep 17 00:00:00 2001 From: Gerald Lonlas Date: Mon, 22 Jan 2018 21:17:54 -0800 Subject: [PATCH] Add support of custom strategy in plot_profit.py --- scripts/plot_profit.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/plot_profit.py b/scripts/plot_profit.py index e8bdbee5c..3f753cac9 100755 --- a/scripts/plot_profit.py +++ b/scripts/plot_profit.py @@ -10,6 +10,7 @@ import freqtrade.optimize as optimize import freqtrade.misc as misc import freqtrade.exchange as exchange import freqtrade.analyze as analyze +from freqtrade.strategy.strategy import Strategy def plot_parse_args(args ): @@ -70,14 +71,21 @@ def plot_profit(args) -> None: filter_pairs = args.pair config = misc.load_config(args.config) + config.update({'strategy': args.strategy}) + + # Init strategy + strategy = Strategy() + strategy.init(config) + pairs = config['exchange']['pair_whitelist'] + if filter_pairs: filter_pairs = filter_pairs.split(',') pairs = list(set(pairs) & set(filter_pairs)) print('Filter, keep pairs %s' % pairs) tickers = optimize.load_data(args.datadir, pairs=pairs, - ticker_interval=args.ticker_interval, + ticker_interval=strategy.ticker_interval, refresh_pairs=False) dataframes = optimize.preprocess(tickers)