mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-25 16:30:26 +00:00
Added use_parallel_download command line option
This commit is contained in:
@@ -156,6 +156,7 @@ ARGS_DOWNLOAD_DATA = [
|
||||
"days",
|
||||
"new_pairs_days",
|
||||
"include_inactive",
|
||||
"use_parallel_download",
|
||||
"timerange",
|
||||
"download_trades",
|
||||
"convert_trades",
|
||||
|
||||
@@ -436,6 +436,11 @@ AVAILABLE_CLI_OPTIONS = {
|
||||
help="Also download data from inactive pairs.",
|
||||
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",
|
||||
help="Download data of new pairs for given number of days. Default: `%(default)s`.",
|
||||
|
||||
@@ -377,6 +377,7 @@ class Configuration:
|
||||
("timeframes", "timeframes --timeframes: {}"),
|
||||
("days", "Detected --days: {}"),
|
||||
("include_inactive", "Detected --include-inactive-pairs: {}"),
|
||||
("use_parallel_download", "Detected --use-parallel-download: {}"),
|
||||
("download_trades", "Detected --dl-trades: {}"),
|
||||
("convert_trades", "Detected --convert: {} - Converting Trade data to OHCV {}"),
|
||||
("dataformat_ohlcv", 'Using "{}" to store OHLCV data.'),
|
||||
|
||||
@@ -359,6 +359,7 @@ def refresh_backtest_ohlcv_data(
|
||||
data_format: str | None = None,
|
||||
prepend: bool = False,
|
||||
progress_tracker: CustomProgress | None = None,
|
||||
use_parallel_download: bool = False,
|
||||
) -> list[str]:
|
||||
"""
|
||||
Refresh stored ohlcv data for backtesting and hyperopt operations.
|
||||
@@ -387,7 +388,7 @@ def refresh_backtest_ohlcv_data(
|
||||
for timeframe in timeframes:
|
||||
# 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.
|
||||
if (
|
||||
if use_parallel_download and (
|
||||
((pair, timeframe, candle_type) not in fast_candles)
|
||||
and (erase is False)
|
||||
and (prepend is False)
|
||||
@@ -785,6 +786,7 @@ def download_data(
|
||||
trading_mode=config.get("trading_mode", "spot"),
|
||||
prepend=config.get("prepend_data", False),
|
||||
progress_tracker=progress_tracker,
|
||||
use_parallel_download=config.get("use_parallel_download", False),
|
||||
)
|
||||
finally:
|
||||
if pairs_not_available:
|
||||
|
||||
Reference in New Issue
Block a user