reinitializing Edge calculated data in case of inability to download
backtesting data
This commit is contained in:
parent
3330d327ed
commit
866da8aaa1
@ -92,6 +92,8 @@ class Edge():
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not data:
|
if not data:
|
||||||
|
# Reinitializing cached pairs
|
||||||
|
self._cached_pairs = {}
|
||||||
logger.critical("No data found. Edge is stopped ...")
|
logger.critical("No data found. Edge is stopped ...")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ ticker_interval_in_minute = 60
|
|||||||
_ohlc = {'date': 0, 'buy': 1, 'open': 2, 'high': 3, 'low': 4, 'close': 5, 'sell': 6, 'volume': 7}
|
_ohlc = {'date': 0, 'buy': 1, 'open': 2, 'high': 3, 'low': 4, 'close': 5, 'sell': 6, 'volume': 7}
|
||||||
|
|
||||||
|
|
||||||
def test_filter(mocker, default_conf):
|
def test_adjust(mocker, default_conf):
|
||||||
exchange = get_patched_exchange(mocker, default_conf)
|
exchange = get_patched_exchange(mocker, default_conf)
|
||||||
edge = Edge(default_conf, exchange)
|
edge = Edge(default_conf, exchange)
|
||||||
mocker.patch('freqtrade.edge.Edge._cached_pairs', mocker.PropertyMock(
|
mocker.patch('freqtrade.edge.Edge._cached_pairs', mocker.PropertyMock(
|
||||||
@ -34,7 +34,7 @@ def test_filter(mocker, default_conf):
|
|||||||
))
|
))
|
||||||
|
|
||||||
pairs = ['A/B', 'C/D', 'E/F', 'G/H']
|
pairs = ['A/B', 'C/D', 'E/F', 'G/H']
|
||||||
assert(edge.filter(pairs) == ['E/F', 'C/D'])
|
assert(edge.adjust(pairs) == ['E/F', 'C/D'])
|
||||||
|
|
||||||
|
|
||||||
def test_stoploss(mocker, default_conf):
|
def test_stoploss(mocker, default_conf):
|
||||||
|
Loading…
Reference in New Issue
Block a user