From cf1c704b547713ab90c018e546aeed51b37007c0 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sun, 20 Jun 2021 01:03:18 -0600 Subject: [PATCH] Added todos to command files --- freqtrade/commands/arguments.py | 4 ++-- freqtrade/commands/build_config_commands.py | 1 + freqtrade/commands/cli_options.py | 16 ++++++++++++++++ freqtrade/commands/deploy_commands.py | 4 +++- freqtrade/commands/hyperopt_commands.py | 2 ++ freqtrade/commands/list_commands.py | 1 + 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/freqtrade/commands/arguments.py b/freqtrade/commands/arguments.py index 7f4f7edd6..fd9da30da 100644 --- a/freqtrade/commands/arguments.py +++ b/freqtrade/commands/arguments.py @@ -14,7 +14,7 @@ ARGS_COMMON = ["verbosity", "logfile", "version", "config", "datadir", "user_dat ARGS_STRATEGY = ["strategy", "strategy_path"] -ARGS_TRADE = ["db_url", "sd_notify", "dry_run", "dry_run_wallet", "fee"] +ARGS_TRADE = ["db_url", "sd_notify", "dry_run", "dry_run_wallet", "fee"] #TODO: leverage? ARGS_COMMON_OPTIMIZE = ["timeframe", "timerange", "dataformat_ohlcv", "max_open_trades", "stake_amount", "fee", "pairs"] @@ -58,7 +58,7 @@ ARGS_BUILD_HYPEROPT = ["user_data_dir", "hyperopt", "template"] ARGS_CONVERT_DATA = ["pairs", "format_from", "format_to", "erase"] ARGS_CONVERT_DATA_OHLCV = ARGS_CONVERT_DATA + ["timeframes"] -ARGS_LIST_DATA = ["exchange", "dataformat_ohlcv", "pairs"] +ARGS_LIST_DATA = ["exchange", "dataformat_ohlcv", "pairs"] #TODO: Leverage? ARGS_DOWNLOAD_DATA = ["pairs", "pairs_file", "days", "new_pairs_days", "timerange", "download_trades", "exchange", "timeframes", "erase", "dataformat_ohlcv", diff --git a/freqtrade/commands/build_config_commands.py b/freqtrade/commands/build_config_commands.py index 03d095e12..0d3cb1b88 100644 --- a/freqtrade/commands/build_config_commands.py +++ b/freqtrade/commands/build_config_commands.py @@ -167,6 +167,7 @@ def ask_user_config() -> Dict[str, Any]: "when": lambda x: x['api_server'] }, ] + #TODO: Enable short trading, trade with leverage answers = prompt(questions) if not answers: diff --git a/freqtrade/commands/cli_options.py b/freqtrade/commands/cli_options.py index b226415e7..2bf6d6dac 100644 --- a/freqtrade/commands/cli_options.py +++ b/freqtrade/commands/cli_options.py @@ -543,4 +543,20 @@ AVAILABLE_CLI_OPTIONS = { help='Do not print epoch details header.', action='store_true', ), + #TODO: Set up these options + # "leverage": Arg( + # '-L', '--leverage', + # help='Leverage applied for margin and futures trading.', + # action='' + # ), + # "leverage_min": Arg( + # '--leverage-min', + # help='The minimum leverage to trade at if the desired leverage is not available', + # action='' + # ), + # "shorts_enabled": Arg( + # '--shorts-enabled', + # help='Enables short trading', + # action='' + # ) } diff --git a/freqtrade/commands/deploy_commands.py b/freqtrade/commands/deploy_commands.py index cc0d653b9..758b8500a 100644 --- a/freqtrade/commands/deploy_commands.py +++ b/freqtrade/commands/deploy_commands.py @@ -55,6 +55,7 @@ def deploy_new_strategy(strategy_name: str, strategy_path: Path, subtemplate: st templatefile=f"subtemplates/strategy_methods_{subtemplate}.j2", templatefallbackfile="subtemplates/strategy_methods_empty.j2", ) + #TODO: Short Trend, Exit short trend strategy_text = render_template(templatefile='base_strategy.py.j2', arguments={"strategy": strategy_name, @@ -110,6 +111,7 @@ def deploy_new_hyperopt(hyperopt_name: str, hyperopt_path: Path, subtemplate: st templatefile=f"subtemplates/hyperopt_sell_space_{subtemplate}.j2", templatefallbackfile=f"subtemplates/hyperopt_sell_space_{fallback}.j2", ) + #TODO: short_guards, exit_short_guards, short_space, exit_short_space strategy_text = render_template(templatefile='base_hyperopt.py.j2', arguments={"hyperopt": hyperopt_name, @@ -117,7 +119,7 @@ def deploy_new_hyperopt(hyperopt_name: str, hyperopt_path: Path, subtemplate: st "sell_guards": sell_guards, "buy_space": buy_space, "sell_space": sell_space, - }) + }) #TODO: short_guards, exit_short_guards, short_space, exit_short_space logger.info(f"Writing hyperopt to `{hyperopt_path}`.") hyperopt_path.write_text(strategy_text) diff --git a/freqtrade/commands/hyperopt_commands.py b/freqtrade/commands/hyperopt_commands.py index 19337b407..822828f26 100755 --- a/freqtrade/commands/hyperopt_commands.py +++ b/freqtrade/commands/hyperopt_commands.py @@ -269,3 +269,5 @@ def _hyperopt_filter_epochs_objective(epochs: List, filteroptions: dict) -> List epochs = [x for x in epochs if x['loss'] > filteroptions['filter_max_objective']] return epochs + +#TODO: Hyperopt optimal leverage \ No newline at end of file diff --git a/freqtrade/commands/list_commands.py b/freqtrade/commands/list_commands.py index cd26aa60e..a67de14c2 100644 --- a/freqtrade/commands/list_commands.py +++ b/freqtrade/commands/list_commands.py @@ -148,6 +148,7 @@ def start_list_markets(args: Dict[str, Any], pairs_only: bool = False) -> None: quote_currencies = args.get('quote_currencies', []) try: + #TODO: Add leverage amount to get markets that support a certain leverage pairs = exchange.get_markets(base_currencies=base_currencies, quote_currencies=quote_currencies, pairs_only=pairs_only,