Added use_parallel_download command line option
This commit is contained in:
@@ -156,6 +156,7 @@ ARGS_DOWNLOAD_DATA = [
|
|||||||
"days",
|
"days",
|
||||||
"new_pairs_days",
|
"new_pairs_days",
|
||||||
"include_inactive",
|
"include_inactive",
|
||||||
|
"use_parallel_download",
|
||||||
"timerange",
|
"timerange",
|
||||||
"download_trades",
|
"download_trades",
|
||||||
"convert_trades",
|
"convert_trades",
|
||||||
|
|||||||
@@ -436,6 +436,11 @@ AVAILABLE_CLI_OPTIONS = {
|
|||||||
help="Also download data from inactive pairs.",
|
help="Also download data from inactive pairs.",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
),
|
),
|
||||||
|
"use_parallel_download": Arg(
|
||||||
|
"--use-parallel-download",
|
||||||
|
help="Use the Parallel Downloader.",
|
||||||
|
action="store_true",
|
||||||
|
),
|
||||||
"new_pairs_days": Arg(
|
"new_pairs_days": Arg(
|
||||||
"--new-pairs-days",
|
"--new-pairs-days",
|
||||||
help="Download data of new pairs for given number of days. Default: `%(default)s`.",
|
help="Download data of new pairs for given number of days. Default: `%(default)s`.",
|
||||||
|
|||||||
@@ -377,6 +377,7 @@ class Configuration:
|
|||||||
("timeframes", "timeframes --timeframes: {}"),
|
("timeframes", "timeframes --timeframes: {}"),
|
||||||
("days", "Detected --days: {}"),
|
("days", "Detected --days: {}"),
|
||||||
("include_inactive", "Detected --include-inactive-pairs: {}"),
|
("include_inactive", "Detected --include-inactive-pairs: {}"),
|
||||||
|
("use_parallel_download", "Detected --use-parallel-download: {}"),
|
||||||
("download_trades", "Detected --dl-trades: {}"),
|
("download_trades", "Detected --dl-trades: {}"),
|
||||||
("convert_trades", "Detected --convert: {} - Converting Trade data to OHCV {}"),
|
("convert_trades", "Detected --convert: {} - Converting Trade data to OHCV {}"),
|
||||||
("dataformat_ohlcv", 'Using "{}" to store OHLCV data.'),
|
("dataformat_ohlcv", 'Using "{}" to store OHLCV data.'),
|
||||||
|
|||||||
@@ -359,6 +359,7 @@ def refresh_backtest_ohlcv_data(
|
|||||||
data_format: str | None = None,
|
data_format: str | None = None,
|
||||||
prepend: bool = False,
|
prepend: bool = False,
|
||||||
progress_tracker: CustomProgress | None = None,
|
progress_tracker: CustomProgress | None = None,
|
||||||
|
use_parallel_download: bool = False,
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Refresh stored ohlcv data for backtesting and hyperopt operations.
|
Refresh stored ohlcv data for backtesting and hyperopt operations.
|
||||||
@@ -387,7 +388,7 @@ def refresh_backtest_ohlcv_data(
|
|||||||
for timeframe in timeframes:
|
for timeframe in timeframes:
|
||||||
# Get fast candles via parallel method on first loop through per timeframe
|
# Get fast candles via parallel method on first loop through per timeframe
|
||||||
# and candle type. Downloads all the pairs in the list and stores them.
|
# and candle type. Downloads all the pairs in the list and stores them.
|
||||||
if (
|
if use_parallel_download and (
|
||||||
((pair, timeframe, candle_type) not in fast_candles)
|
((pair, timeframe, candle_type) not in fast_candles)
|
||||||
and (erase is False)
|
and (erase is False)
|
||||||
and (prepend is False)
|
and (prepend is False)
|
||||||
@@ -785,6 +786,7 @@ def download_data(
|
|||||||
trading_mode=config.get("trading_mode", "spot"),
|
trading_mode=config.get("trading_mode", "spot"),
|
||||||
prepend=config.get("prepend_data", False),
|
prepend=config.get("prepend_data", False),
|
||||||
progress_tracker=progress_tracker,
|
progress_tracker=progress_tracker,
|
||||||
|
use_parallel_download=config.get("use_parallel_download", False),
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
if pairs_not_available:
|
if pairs_not_available:
|
||||||
|
|||||||
Reference in New Issue
Block a user