Merge pull request #2712 from freqtrade/strategylist
add list-strategies subcommand
This commit is contained in:
@@ -30,6 +30,8 @@ ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path",
|
||||
|
||||
ARGS_EDGE = ARGS_COMMON_OPTIMIZE + ["stoploss_range"]
|
||||
|
||||
ARGS_LIST_STRATEGIES = ["strategy_path", "print_one_column"]
|
||||
|
||||
ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all"]
|
||||
|
||||
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column"]
|
||||
@@ -62,7 +64,8 @@ ARGS_HYPEROPT_SHOW = ["hyperopt_list_best", "hyperopt_list_profitable", "hyperop
|
||||
"print_json", "hyperopt_show_no_header"]
|
||||
|
||||
NO_CONF_REQURIED = ["download-data", "list-timeframes", "list-markets", "list-pairs",
|
||||
"hyperopt-list", "hyperopt-show", "plot-dataframe", "plot-profit"]
|
||||
"list-strategies", "hyperopt-list", "hyperopt-show", "plot-dataframe",
|
||||
"plot-profit"]
|
||||
|
||||
NO_CONF_ALLOWED = ["create-userdir", "list-exchanges", "new-hyperopt", "new-strategy"]
|
||||
|
||||
@@ -131,8 +134,9 @@ class Arguments:
|
||||
from freqtrade.utils import (start_create_userdir, start_download_data,
|
||||
start_hyperopt_list, start_hyperopt_show,
|
||||
start_list_exchanges, start_list_markets,
|
||||
start_new_hyperopt, start_new_strategy,
|
||||
start_list_timeframes, start_test_pairlist, start_trading)
|
||||
start_list_strategies, start_new_hyperopt,
|
||||
start_new_strategy, start_list_timeframes,
|
||||
start_test_pairlist, start_trading)
|
||||
from freqtrade.plot.plot_utils import start_plot_dataframe, start_plot_profit
|
||||
|
||||
subparsers = self.parser.add_subparsers(dest='command',
|
||||
@@ -185,6 +189,15 @@ class Arguments:
|
||||
build_hyperopt_cmd.set_defaults(func=start_new_hyperopt)
|
||||
self._build_args(optionlist=ARGS_BUILD_HYPEROPT, parser=build_hyperopt_cmd)
|
||||
|
||||
# Add list-strategies subcommand
|
||||
list_strategies_cmd = subparsers.add_parser(
|
||||
'list-strategies',
|
||||
help='Print available strategies.',
|
||||
parents=[_common_parser],
|
||||
)
|
||||
list_strategies_cmd.set_defaults(func=start_list_strategies)
|
||||
self._build_args(optionlist=ARGS_LIST_STRATEGIES, parser=list_strategies_cmd)
|
||||
|
||||
# Add list-exchanges subcommand
|
||||
list_exchanges_cmd = subparsers.add_parser(
|
||||
'list-exchanges',
|
||||
|
Reference in New Issue
Block a user