Remove hardcoded backtest-result.json in Plot scripts

This commit is contained in:
Gerald Lonlas
2018-06-03 13:58:00 -07:00
parent 15fb81da92
commit 5683f9e10e
5 changed files with 31 additions and 29 deletions

View File

@@ -123,8 +123,8 @@ class Arguments(object):
)
parser.add_argument(
'-r', '--refresh-pairs-cached',
help='refresh the pairs files in tests/testdata with the latest data from the exchange. \
Use it if you want to run your backtesting with up-to-date data.',
help='refresh the pairs files in tests/testdata with the latest data from the '
'exchange. Use it if you want to run your backtesting with up-to-date data.',
action='store_true',
dest='refresh_pairs',
)
@@ -140,11 +140,12 @@ class Arguments(object):
'--export-filename',
help='Save backtest results to this filename \
requires --export to be set as well\
Example --export-filename=backtest_today.json\
Example --export-filename=user_data/backtest_data/backtest_today.json\
(default: %(default)s',
type=str,
default='backtest-result.json',
default=os.path.join('user_data', 'backtest_data', 'backtest-result.json'),
dest='exportfilename',
metavar='PATH',
)
@staticmethod
@@ -220,8 +221,8 @@ class Arguments(object):
self.hyperopt_options(hyperopt_cmd)
@staticmethod
def parse_timerange(text: Optional[str]) -> Optional[Tuple[Tuple,
Optional[int], Optional[int]]]:
def parse_timerange(text: Optional[str]) -> \
Optional[Tuple[Tuple, Optional[int], Optional[int]]]:
"""
Parse the value of the argument --timerange to determine what is the range desired
:param text: value from --timerange