Merge pull request #6341 from TheJoeSchr/backtest-filename
Plotting: add alias `--backtest-filename` for `--export-filename`
This commit is contained in:
commit
06387478b5
@ -318,8 +318,8 @@ optional arguments:
|
|||||||
Specify what timerange of data to use.
|
Specify what timerange of data to use.
|
||||||
--export EXPORT Export backtest results, argument are: trades.
|
--export EXPORT Export backtest results, argument are: trades.
|
||||||
Example: `--export=trades`
|
Example: `--export=trades`
|
||||||
--export-filename PATH
|
--export-filename PATH, --backtest-filename PATH
|
||||||
Save backtest results to the file with this filename.
|
Use backtest results from this filename.
|
||||||
Requires `--export` to be set as well. Example:
|
Requires `--export` to be set as well. Example:
|
||||||
`--export-filename=user_data/backtest_results/backtest
|
`--export-filename=user_data/backtest_results/backtest
|
||||||
_today.json`
|
_today.json`
|
||||||
|
@ -75,7 +75,7 @@ ARGS_PLOT_DATAFRAME = ["pairs", "indicators1", "indicators2", "plot_limit",
|
|||||||
"timerange", "timeframe", "no_trades"]
|
"timerange", "timeframe", "no_trades"]
|
||||||
|
|
||||||
ARGS_PLOT_PROFIT = ["pairs", "timerange", "export", "exportfilename", "db_url",
|
ARGS_PLOT_PROFIT = ["pairs", "timerange", "export", "exportfilename", "db_url",
|
||||||
"trade_source", "timeframe", "plot_auto_open"]
|
"trade_source", "timeframe", "plot_auto_open", ]
|
||||||
|
|
||||||
ARGS_INSTALL_UI = ["erase_ui_only", 'ui_version']
|
ARGS_INSTALL_UI = ["erase_ui_only", 'ui_version']
|
||||||
|
|
||||||
|
@ -182,11 +182,12 @@ AVAILABLE_CLI_OPTIONS = {
|
|||||||
|
|
||||||
),
|
),
|
||||||
"exportfilename": Arg(
|
"exportfilename": Arg(
|
||||||
'--export-filename',
|
"--export-filename",
|
||||||
help='Save backtest results to the file with this filename. '
|
"--backtest-filename",
|
||||||
'Requires `--export` to be set as well. '
|
help="Use this filename for backtest results."
|
||||||
'Example: `--export-filename=user_data/backtest_results/backtest_today.json`',
|
"Requires `--export` to be set as well. "
|
||||||
metavar='PATH',
|
"Example: `--export-filename=user_data/backtest_results/backtest_today.json`",
|
||||||
|
metavar="PATH",
|
||||||
),
|
),
|
||||||
"disableparamexport": Arg(
|
"disableparamexport": Arg(
|
||||||
'--disable-param-export',
|
'--disable-param-export',
|
||||||
|
@ -431,7 +431,6 @@ class Configuration:
|
|||||||
logstring='Using "{}" to store trades data.')
|
logstring='Using "{}" to store trades data.')
|
||||||
|
|
||||||
def _process_data_options(self, config: Dict[str, Any]) -> None:
|
def _process_data_options(self, config: Dict[str, Any]) -> None:
|
||||||
|
|
||||||
self._args_to_config(config, argname='new_pairs_days',
|
self._args_to_config(config, argname='new_pairs_days',
|
||||||
logstring='Detected --new-pairs-days: {}')
|
logstring='Detected --new-pairs-days: {}')
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ def init_plotscript(config, markets: List, startup_candles: int = 0):
|
|||||||
startup_candles, min_date)
|
startup_candles, min_date)
|
||||||
|
|
||||||
no_trades = False
|
no_trades = False
|
||||||
filename = config.get('exportfilename')
|
filename = config.get("exportfilename")
|
||||||
if config.get('no_trades', False):
|
if config.get("no_trades", False):
|
||||||
no_trades = True
|
no_trades = True
|
||||||
elif config['trade_source'] == 'file':
|
elif config['trade_source'] == 'file':
|
||||||
if not filename.is_dir() and not filename.is_file():
|
if not filename.is_dir() and not filename.is_file():
|
||||||
|
Loading…
Reference in New Issue
Block a user