Skip to content

Commit

Permalink
Create new-config command
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Jan 29, 2020
1 parent d40054b commit b384ca8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions freqtrade/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from freqtrade.commands.arguments import Arguments
from freqtrade.commands.data_commands import start_download_data
from freqtrade.commands.deploy_commands import (start_create_userdir,
start_new_config,
start_new_hyperopt,
start_new_strategy)
from freqtrade.commands.hyperopt_commands import (start_hyperopt_list,
Expand Down
13 changes: 11 additions & 2 deletions freqtrade/commands/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

ARGS_CREATE_USERDIR = ["user_data_dir", "reset"]

ARGS_BUILD_CONFIG = ["config"]

ARGS_BUILD_STRATEGY = ["user_data_dir", "strategy", "template"]

ARGS_BUILD_HYPEROPT = ["user_data_dir", "hyperopt", "template"]
Expand Down Expand Up @@ -133,8 +135,9 @@ def _build_subcommands(self) -> None:
from freqtrade.commands import (start_create_userdir, start_download_data,
start_hyperopt_list, start_hyperopt_show,
start_list_exchanges, start_list_markets,
start_list_strategies, start_new_hyperopt,
start_new_strategy, start_list_timeframes,
start_list_strategies, start_list_timeframes,
start_new_config,
start_new_hyperopt, start_new_strategy,
start_plot_dataframe, start_plot_profit,
start_backtesting, start_hyperopt, start_edge,
start_test_pairlist, start_trading)
Expand Down Expand Up @@ -177,6 +180,12 @@ def _build_subcommands(self) -> None:
create_userdir_cmd.set_defaults(func=start_create_userdir)
self._build_args(optionlist=ARGS_CREATE_USERDIR, parser=create_userdir_cmd)

# add new-config subcommand
build_config_cmd = subparsers.add_parser('new-config',
help="Create new config")
build_config_cmd.set_defaults(func=start_new_config)
self._build_args(optionlist=ARGS_BUILD_CONFIG, parser=build_config_cmd)

# add new-strategy subcommand
build_strategy_cmd = subparsers.add_parser('new-strategy',
help="Create new strategy")
Expand Down
8 changes: 8 additions & 0 deletions freqtrade/commands/deploy_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,11 @@ def start_new_hyperopt(args: Dict[str, Any]) -> None:
deploy_new_hyperopt(args['hyperopt'], new_path, args['template'])
else:
raise OperationalException("`new-hyperopt` requires --hyperopt to be set.")


def start_new_config(args: Dict[str, Any]) -> None:
"""
Create a new strategy from a template
Asking the user questions to fill out the templateaccordingly.
"""
pass

0 comments on commit b384ca8

Please sign in to comment.