Use build_args for plot script

This commit is contained in:
Matthias 2019-06-22 20:27:29 +02:00
parent ba7a0dde06
commit ca5093901b
2 changed files with 5 additions and 6 deletions

View File

@ -357,6 +357,9 @@ ARGS_PLOT_DATAFRAME = (ARGS_COMMON + ARGS_STRATEGY +
["pairs", "indicators1", "indicators2", "plot_limit", "db_url", "trade_source",
"export", "exportfilename", "timerange", "refresh_pairs", "live"])
ARGS_PLOT_PROFIT = (ARGS_COMMON + ARGS_STRATEGY +
["pairs", "timerange", "export", "exportfilename"])
class TimeRange(NamedTuple):
"""

View File

@ -24,7 +24,7 @@ import plotly.graph_objs as go
from plotly import tools
from plotly.offline import plot
from freqtrade.arguments import Arguments, ARGS_PLOT_DATAFRAME
from freqtrade.arguments import Arguments, ARGS_PLOT_PROFIT
from freqtrade.configuration import Configuration
from freqtrade.data import history
from freqtrade.exchange import timeframe_to_seconds
@ -206,11 +206,7 @@ def plot_parse_args(args: List[str]) -> Namespace:
:return: args: Array with all arguments
"""
arguments = Arguments(args, 'Graph profits')
arguments.build_args(optionlist=ARGS_PLOT_DATAFRAME)
arguments.common_optimize_options()
arguments.backtesting_options()
arguments.common_scripts_options()
arguments.build_args(optionlist=ARGS_PLOT_PROFIT)
return arguments.parse_args()