Use build_args for plot_dataframe script
This commit is contained in:
parent
7e82be53cd
commit
ee312ac230
@ -354,8 +354,8 @@ ARGS_LIST_EXCHANGE = ["print_one_column"]
|
||||
ARGS_DOWNLOADER = ["pairs", "pairs_file", "days", "exchange", "timeframes", "erase"]
|
||||
|
||||
ARGS_PLOT_DATAFRAME = (ARGS_COMMON + ARGS_STRATEGY +
|
||||
["pairs", "indicators1", "indicators2", "plot_limit", "db_url",
|
||||
"export", "exportfilename", "trade_source"])
|
||||
["pairs", "indicators1", "indicators2", "plot_limit", "db_url", "trade_source",
|
||||
"export", "exportfilename", "timerange", "refresh_pairs", "live"])
|
||||
|
||||
|
||||
class TimeRange(NamedTuple):
|
||||
|
@ -31,7 +31,7 @@ from typing import Any, Dict, List
|
||||
|
||||
import pandas as pd
|
||||
|
||||
from freqtrade.arguments import Arguments
|
||||
from freqtrade.arguments import ARGS_PLOT_DATAFRAME, Arguments
|
||||
from freqtrade.data import history
|
||||
from freqtrade.data.btanalysis import (extract_trades_of_period,
|
||||
load_backtest_data, load_trades_from_db)
|
||||
@ -125,12 +125,8 @@ def plot_parse_args(args: List[str]) -> Dict[str, Any]:
|
||||
:return: args: Array with all arguments
|
||||
"""
|
||||
arguments = Arguments(args, 'Graph dataframe')
|
||||
arguments.common_options()
|
||||
arguments.main_options()
|
||||
arguments.common_optimize_options()
|
||||
arguments.backtesting_options()
|
||||
arguments.common_scripts_options()
|
||||
arguments.plot_dataframe_options()
|
||||
arguments.build_args(optionlist=ARGS_PLOT_DATAFRAME)
|
||||
|
||||
parsed_args = arguments.parse_args()
|
||||
|
||||
# Load the configuration
|
||||
|
@ -24,7 +24,7 @@ import plotly.graph_objs as go
|
||||
from plotly import tools
|
||||
from plotly.offline import plot
|
||||
|
||||
from freqtrade.arguments import Arguments
|
||||
from freqtrade.arguments import Arguments, ARGS_PLOT_DATAFRAME
|
||||
from freqtrade.configuration import Configuration
|
||||
from freqtrade.data import history
|
||||
from freqtrade.exchange import timeframe_to_seconds
|
||||
@ -206,8 +206,8 @@ def plot_parse_args(args: List[str]) -> Namespace:
|
||||
:return: args: Array with all arguments
|
||||
"""
|
||||
arguments = Arguments(args, 'Graph profits')
|
||||
arguments.common_options()
|
||||
arguments.main_options()
|
||||
arguments.build_args(optionlist=ARGS_PLOT_DATAFRAME)
|
||||
|
||||
arguments.common_optimize_options()
|
||||
arguments.backtesting_options()
|
||||
arguments.common_scripts_options()
|
||||
|
Loading…
Reference in New Issue
Block a user