Allow strategy for plot-profit

to allow loading of multi-backtest files
This commit is contained in:
Matthias
2020-07-03 06:58:06 +02:00
parent 16a842f9f6
commit 619eb183fe
3 changed files with 10 additions and 4 deletions

View File

@@ -354,7 +354,7 @@ class Arguments:
plot_profit_cmd = subparsers.add_parser(
'plot-profit',
help='Generate plot showing profits.',
parents=[_common_parser],
parents=[_common_parser, _strategy_parser],
)
plot_profit_cmd.set_defaults(func=start_plot_profit)
self._build_args(optionlist=ARGS_PLOT_PROFIT, parser=plot_profit_cmd)

View File

@@ -9,7 +9,6 @@ from freqtrade.data.btanalysis import (calculate_max_drawdown,
combine_dataframes_with_mean,
create_cum_profit,
extract_trades_of_period,
get_latest_backtest_filename,
load_trades)
from freqtrade.data.converter import trim_dataframe
from freqtrade.data.history import load_data
@@ -65,7 +64,8 @@ def init_plotscript(config):
config['trade_source'],
db_url=config.get('db_url'),
exportfilename=filename,
no_trades=no_trades
no_trades=no_trades,
strategy=config.get("strategy"),
)
trades = trim_dataframe(trades, timerange, 'open_date')