Improve error when hyperopt-loss-function is missing

This commit is contained in:
Matthias
2020-10-28 07:58:55 +01:00
parent 28d6c3419b
commit 5cb3735a57
3 changed files with 11 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ Definition of cli arguments used in arguments.py
from argparse import ArgumentTypeError
from freqtrade import __version__, constants
from freqtrade.constants import HYPEROPT_LOSS_BUILTIN
def check_int_positive(value: str) -> int:
@@ -257,8 +258,7 @@ AVAILABLE_CLI_OPTIONS = {
help='Specify the class name of the hyperopt loss function class (IHyperOptLoss). '
'Different functions can generate completely different results, '
'since the target for optimization is different. Built-in Hyperopt-loss-functions are: '
'ShortTradeDurHyperOptLoss, OnlyProfitHyperOptLoss, SharpeHyperOptLoss, '
'SharpeHyperOptLossDaily, SortinoHyperOptLoss, SortinoHyperOptLossDaily.',
f'{", ".join(HYPEROPT_LOSS_BUILTIN)}',
metavar='NAME',
),
"hyperoptexportfilename": Arg(