mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
remove --live
references
This commit is contained in:
parent
af51ff4162
commit
e9e2a83436
|
@ -67,22 +67,10 @@ freqtrade backtesting
|
|||
freqtrade backtesting --ticker-interval 1m
|
||||
```
|
||||
|
||||
#### Update cached pairs with the latest data
|
||||
|
||||
```bash
|
||||
freqtrade backtesting --refresh-pairs-cached
|
||||
```
|
||||
|
||||
#### With live data (do not alter your testdata files)
|
||||
|
||||
```bash
|
||||
freqtrade backtesting --live
|
||||
```
|
||||
|
||||
#### Using a different on-disk ticker-data source
|
||||
|
||||
```bash
|
||||
freqtrade backtesting --datadir freqtrade/tests/testdata-20180101
|
||||
freqtrade backtesting --datadir user_data/data/bittrex-20180101
|
||||
```
|
||||
|
||||
#### With a (custom) strategy file
|
||||
|
|
|
@ -166,7 +166,6 @@ optional arguments:
|
|||
Disable applying `max_open_trades` during backtest
|
||||
(same as setting `max_open_trades` to a very high
|
||||
number).
|
||||
-l, --live Use live data.
|
||||
--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]
|
||||
Provide a space-separated list of strategies to
|
||||
backtest Please note that ticker-interval needs to be
|
||||
|
|
|
@ -15,7 +15,7 @@ pip install -U -r requirements-plot.txt
|
|||
Usage for the price plotter:
|
||||
|
||||
``` bash
|
||||
python3 script/plot_dataframe.py [-h] [-p pairs] [--live]
|
||||
python3 script/plot_dataframe.py [-h] [-p pairs]
|
||||
```
|
||||
|
||||
Example
|
||||
|
@ -41,12 +41,6 @@ To plot multiple pairs, separate them with a comma:
|
|||
python3 scripts/plot_dataframe.py -p BTC/ETH,XRP/ETH
|
||||
```
|
||||
|
||||
To plot the current live price use the `--live` flag:
|
||||
|
||||
``` bash
|
||||
python3 scripts/plot_dataframe.py -p BTC/ETH --live
|
||||
```
|
||||
|
||||
To plot a timerange (to zoom in):
|
||||
|
||||
``` bash
|
||||
|
|
|
@ -17,7 +17,7 @@ ARGS_COMMON_OPTIMIZE = ["ticker_interval", "timerange",
|
|||
"max_open_trades", "stake_amount", "refresh_pairs"]
|
||||
|
||||
ARGS_BACKTEST = ARGS_COMMON_OPTIMIZE + ["position_stacking", "use_max_market_positions",
|
||||
"live", "strategy_list", "export", "exportfilename"]
|
||||
"strategy_list", "export", "exportfilename"]
|
||||
|
||||
ARGS_HYPEROPT = ARGS_COMMON_OPTIMIZE + ["hyperopt", "hyperopt_path",
|
||||
"position_stacking", "epochs", "spaces",
|
||||
|
@ -35,7 +35,7 @@ ARGS_DOWNLOAD_DATA = ["pairs", "pairs_file", "days", "exchange", "timeframes", "
|
|||
ARGS_PLOT_DATAFRAME = (ARGS_COMMON + ARGS_STRATEGY +
|
||||
["pairs", "indicators1", "indicators2", "plot_limit", "db_url",
|
||||
"trade_source", "export", "exportfilename", "timerange",
|
||||
"refresh_pairs", "live"])
|
||||
"refresh_pairs"])
|
||||
|
||||
ARGS_PLOT_PROFIT = (ARGS_COMMON + ARGS_STRATEGY +
|
||||
["pairs", "timerange", "export", "exportfilename", "db_url", "trade_source"])
|
||||
|
|
|
@ -123,11 +123,6 @@ AVAILABLE_CLI_OPTIONS = {
|
|||
action='store_false',
|
||||
default=True,
|
||||
),
|
||||
"live": Arg(
|
||||
'-l', '--live',
|
||||
help='Use live data.',
|
||||
action='store_true',
|
||||
),
|
||||
"strategy_list": Arg(
|
||||
'--strategy-list',
|
||||
help='Provide a space-separated list of strategies to backtest. '
|
||||
|
|
|
@ -175,10 +175,6 @@ class Configuration(object):
|
|||
logstring='Parameter -i/--ticker-interval detected ... '
|
||||
'Using ticker_interval: {} ...')
|
||||
|
||||
self._args_to_config(config, argname='live',
|
||||
logstring='Parameter -l/--live detected ...',
|
||||
deprecated_msg='--live will be removed soon.')
|
||||
|
||||
self._args_to_config(config, argname='position_stacking',
|
||||
logstring='Parameter --enable-position-stacking detected ...')
|
||||
|
||||
|
|
|
@ -186,9 +186,6 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
|||
assert 'ticker_interval' in config
|
||||
assert not log_has_re('Parameter -i/--ticker-interval detected .*', caplog)
|
||||
|
||||
assert 'live' not in config
|
||||
assert not log_has('Parameter -l/--live detected ...', caplog)
|
||||
|
||||
assert 'position_stacking' not in config
|
||||
assert not log_has('Parameter --enable-position-stacking detected ...', caplog)
|
||||
|
||||
|
@ -201,7 +198,6 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
|||
assert config['runmode'] == RunMode.BACKTEST
|
||||
|
||||
|
||||
@pytest.mark.filterwarnings("ignore:DEPRECATED")
|
||||
def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) -> None:
|
||||
patched_configuration_load_config_file(mocker, default_conf)
|
||||
mocker.patch(
|
||||
|
@ -215,7 +211,6 @@ def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) ->
|
|||
'--datadir', '/foo/bar',
|
||||
'backtesting',
|
||||
'--ticker-interval', '1m',
|
||||
'--live',
|
||||
'--enable-position-stacking',
|
||||
'--disable-max-market-positions',
|
||||
'--refresh-pairs-cached',
|
||||
|
@ -238,9 +233,6 @@ def test_setup_bt_configuration_with_arguments(mocker, default_conf, caplog) ->
|
|||
assert log_has('Parameter -i/--ticker-interval detected ... Using ticker_interval: 1m ...',
|
||||
caplog)
|
||||
|
||||
assert 'live' in config
|
||||
assert log_has('Parameter -l/--live detected ...', caplog)
|
||||
|
||||
assert 'position_stacking' in config
|
||||
assert log_has('Parameter --enable-position-stacking detected ...', caplog)
|
||||
|
||||
|
@ -815,8 +807,7 @@ def test_backtest_record(default_conf, fee, mocker):
|
|||
assert dur > 0
|
||||
|
||||
|
||||
@pytest.mark.filterwarnings("ignore:DEPRECATED")
|
||||
def test_backtest_start_live(default_conf, mocker, caplog):
|
||||
def test_backtest_start_timerange(default_conf, mocker, caplog):
|
||||
default_conf['exchange']['pair_whitelist'] = ['UNITTEST/BTC']
|
||||
|
||||
async def load_pairs(pair, timeframe, since):
|
||||
|
@ -836,7 +827,6 @@ def test_backtest_start_live(default_conf, mocker, caplog):
|
|||
'--datadir', 'freqtrade/tests/testdata',
|
||||
'backtesting',
|
||||
'--ticker-interval', '1m',
|
||||
'--live',
|
||||
'--timerange', '-100',
|
||||
'--enable-position-stacking',
|
||||
'--disable-max-market-positions'
|
||||
|
@ -846,14 +836,12 @@ def test_backtest_start_live(default_conf, mocker, caplog):
|
|||
# check the logs, that will contain the backtest result
|
||||
exists = [
|
||||
'Parameter -i/--ticker-interval detected ... Using ticker_interval: 1m ...',
|
||||
'Parameter -l/--live detected ...',
|
||||
'Ignoring max_open_trades (--disable-max-market-positions was used) ...',
|
||||
'Parameter --timerange detected: -100 ...',
|
||||
'Using data directory: freqtrade/tests/testdata ...',
|
||||
'Using stake_currency: BTC ...',
|
||||
'Using stake_amount: 0.001 ...',
|
||||
'Live: Downloading data for all defined pairs ...',
|
||||
'Backtesting with data from 2017-11-14T19:31:00+00:00 '
|
||||
'Backtesting with data from 2017-11-14T21:17:00+00:00 '
|
||||
'up to 2017-11-14T22:58:00+00:00 (0 days)..',
|
||||
'Parameter --enable-position-stacking detected ...'
|
||||
]
|
||||
|
@ -862,7 +850,6 @@ def test_backtest_start_live(default_conf, mocker, caplog):
|
|||
assert log_has(line, caplog)
|
||||
|
||||
|
||||
@pytest.mark.filterwarnings("ignore:DEPRECATED")
|
||||
def test_backtest_start_multi_strat(default_conf, mocker, caplog):
|
||||
default_conf['exchange']['pair_whitelist'] = ['UNITTEST/BTC']
|
||||
|
||||
|
@ -886,7 +873,6 @@ def test_backtest_start_multi_strat(default_conf, mocker, caplog):
|
|||
'--datadir', 'freqtrade/tests/testdata',
|
||||
'backtesting',
|
||||
'--ticker-interval', '1m',
|
||||
'--live',
|
||||
'--timerange', '-100',
|
||||
'--enable-position-stacking',
|
||||
'--disable-max-market-positions',
|
||||
|
@ -904,14 +890,12 @@ def test_backtest_start_multi_strat(default_conf, mocker, caplog):
|
|||
# check the logs, that will contain the backtest result
|
||||
exists = [
|
||||
'Parameter -i/--ticker-interval detected ... Using ticker_interval: 1m ...',
|
||||
'Parameter -l/--live detected ...',
|
||||
'Ignoring max_open_trades (--disable-max-market-positions was used) ...',
|
||||
'Parameter --timerange detected: -100 ...',
|
||||
'Using data directory: freqtrade/tests/testdata ...',
|
||||
'Using stake_currency: BTC ...',
|
||||
'Using stake_amount: 0.001 ...',
|
||||
'Live: Downloading data for all defined pairs ...',
|
||||
'Backtesting with data from 2017-11-14T19:31:00+00:00 '
|
||||
'Backtesting with data from 2017-11-14T21:17:00+00:00 '
|
||||
'up to 2017-11-14T22:58:00+00:00 (0 days)..',
|
||||
'Parameter --enable-position-stacking detected ...',
|
||||
'Running backtesting for Strategy DefaultStrategy',
|
||||
|
|
|
@ -83,9 +83,6 @@ def test_setup_hyperopt_configuration_without_arguments(mocker, default_conf, ca
|
|||
assert 'ticker_interval' in config
|
||||
assert not log_has_re('Parameter -i/--ticker-interval detected .*', caplog)
|
||||
|
||||
assert 'live' not in config
|
||||
assert not log_has('Parameter -l/--live detected ...', caplog)
|
||||
|
||||
assert 'position_stacking' not in config
|
||||
assert not log_has('Parameter --enable-position-stacking detected ...', caplog)
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ def test_parse_args_backtesting_custom() -> None:
|
|||
args = [
|
||||
'-c', 'test_conf.json',
|
||||
'backtesting',
|
||||
'--live',
|
||||
'--ticker-interval', '1m',
|
||||
'--refresh-pairs-cached',
|
||||
'--strategy-list',
|
||||
|
@ -107,7 +106,6 @@ def test_parse_args_backtesting_custom() -> None:
|
|||
]
|
||||
call_args = Arguments(args, '').get_parsed_arg()
|
||||
assert call_args.config == ['test_conf.json']
|
||||
assert call_args.live is True
|
||||
assert call_args.verbosity == 0
|
||||
assert call_args.subparser == 'backtesting'
|
||||
assert call_args.func is not None
|
||||
|
|
|
@ -335,9 +335,6 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
|||
assert 'ticker_interval' in config
|
||||
assert not log_has('Parameter -i/--ticker-interval detected ...', caplog)
|
||||
|
||||
assert 'live' not in config
|
||||
assert not log_has('Parameter -l/--live detected ...', caplog)
|
||||
|
||||
assert 'position_stacking' not in config
|
||||
assert not log_has('Parameter --enable-position-stacking detected ...', caplog)
|
||||
|
||||
|
@ -348,7 +345,6 @@ def test_setup_configuration_without_arguments(mocker, default_conf, caplog) ->
|
|||
assert 'export' not in config
|
||||
|
||||
|
||||
@pytest.mark.filterwarnings("ignore:DEPRECATED")
|
||||
def test_setup_configuration_with_arguments(mocker, default_conf, caplog) -> None:
|
||||
patched_configuration_load_config_file(mocker, default_conf)
|
||||
mocker.patch(
|
||||
|
@ -362,7 +358,6 @@ def test_setup_configuration_with_arguments(mocker, default_conf, caplog) -> Non
|
|||
'--datadir', '/foo/bar',
|
||||
'backtesting',
|
||||
'--ticker-interval', '1m',
|
||||
'--live',
|
||||
'--enable-position-stacking',
|
||||
'--disable-max-market-positions',
|
||||
'--refresh-pairs-cached',
|
||||
|
@ -385,9 +380,6 @@ def test_setup_configuration_with_arguments(mocker, default_conf, caplog) -> Non
|
|||
assert log_has('Parameter -i/--ticker-interval detected ... Using ticker_interval: 1m ...',
|
||||
caplog)
|
||||
|
||||
assert 'live' in config
|
||||
assert log_has('Parameter -l/--live detected ...', caplog)
|
||||
|
||||
assert 'position_stacking'in config
|
||||
assert log_has('Parameter --enable-position-stacking detected ...', caplog)
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ def test_parse_args_backtesting(mocker) -> None:
|
|||
assert backtesting_mock.call_count == 1
|
||||
call_args = backtesting_mock.call_args[0][0]
|
||||
assert call_args.config == ['config.json']
|
||||
assert call_args.live is False
|
||||
assert call_args.verbosity == 0
|
||||
assert call_args.subparser == 'backtesting'
|
||||
assert call_args.func is not None
|
||||
|
|
Loading…
Reference in New Issue
Block a user