Add support of --refresh-pairs-cached param
This commit is contained in:
parent
af76d5f0e0
commit
64504e6777
@ -24,7 +24,6 @@ import plotly.graph_objs as go
|
|||||||
from freqtrade.arguments import Arguments
|
from freqtrade.arguments import Arguments
|
||||||
from freqtrade.analyze import Analyze
|
from freqtrade.analyze import Analyze
|
||||||
from freqtrade.optimize.backtesting import setup_configuration
|
from freqtrade.optimize.backtesting import setup_configuration
|
||||||
from freqtrade.configuration import Configuration
|
|
||||||
from freqtrade import exchange
|
from freqtrade import exchange
|
||||||
import freqtrade.optimize as optimize
|
import freqtrade.optimize as optimize
|
||||||
from freqtrade import persistence
|
from freqtrade import persistence
|
||||||
@ -52,6 +51,7 @@ def plot_analyzed_dataframe(args: Namespace) -> None:
|
|||||||
# Load the strategy
|
# Load the strategy
|
||||||
try:
|
try:
|
||||||
analyze = Analyze(config)
|
analyze = Analyze(config)
|
||||||
|
exchange.init(config)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
logger.critical(
|
logger.critical(
|
||||||
'Impossible to load the strategy. Please check the file "user_data/strategies/%s.py"',
|
'Impossible to load the strategy. Please check the file "user_data/strategies/%s.py"',
|
||||||
@ -67,17 +67,20 @@ def plot_analyzed_dataframe(args: Namespace) -> None:
|
|||||||
if args.live:
|
if args.live:
|
||||||
logger.info('Downloading pair.')
|
logger.info('Downloading pair.')
|
||||||
# Init Bittrex to use public API
|
# Init Bittrex to use public API
|
||||||
exchange.init(config)
|
|
||||||
tickers[pair] = exchange.get_ticker_history(pair, tick_interval)
|
tickers[pair] = exchange.get_ticker_history(pair, tick_interval)
|
||||||
else:
|
else:
|
||||||
tickers = optimize.load_data(
|
tickers = optimize.load_data(
|
||||||
datadir=args.datadir,
|
datadir=args.datadir,
|
||||||
pairs=[pair],
|
pairs=[pair],
|
||||||
ticker_interval=tick_interval,
|
ticker_interval=tick_interval,
|
||||||
refresh_pairs=False,
|
refresh_pairs=config.get('refresh_pairs', False),
|
||||||
timerange=timerange
|
timerange=timerange
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# No ticker found, or impossible to download
|
||||||
|
if tickers == {}:
|
||||||
|
exit()
|
||||||
|
|
||||||
# Get trades already made from the DB
|
# Get trades already made from the DB
|
||||||
trades = []
|
trades = []
|
||||||
if args.db_url:
|
if args.db_url:
|
||||||
|
Loading…
Reference in New Issue
Block a user