add logger message, add dask-workers-space in gitignore
This commit is contained in:
parent
15d33c1478
commit
dd8603f476
3
.gitignore
vendored
3
.gitignore
vendored
@ -92,3 +92,6 @@ target/
|
|||||||
|
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
|
|
||||||
|
# Dask
|
||||||
|
dask-worker-space/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
""" FreqTrade bot """
|
""" FreqTrade bot """
|
||||||
__version__ = '0.17.1'
|
__version__ = '0.17.2'
|
||||||
|
|
||||||
|
|
||||||
class DependencyException(BaseException):
|
class DependencyException(BaseException):
|
||||||
|
@ -387,7 +387,11 @@ class FreqtradeBot(object):
|
|||||||
'Checking buy signals to create a new trade with stake_amount: %f ...',
|
'Checking buy signals to create a new trade with stake_amount: %f ...',
|
||||||
stake_amount
|
stake_amount
|
||||||
)
|
)
|
||||||
|
log_msg_p1 = "Done gathering histories and checking signals for"
|
||||||
|
log_msg_p2 = "pairs of whitelist in"
|
||||||
|
|
||||||
whitelist = copy.deepcopy(self.config['exchange']['pair_whitelist'])
|
whitelist = copy.deepcopy(self.config['exchange']['pair_whitelist'])
|
||||||
|
pairs_number = len(whitelist)
|
||||||
|
|
||||||
# Remove currently opened and latest pairs from whitelist
|
# Remove currently opened and latest pairs from whitelist
|
||||||
for trade in Trade.query.filter(Trade.is_open.is_(True)).all():
|
for trade in Trade.query.filter(Trade.is_open.is_(True)).all():
|
||||||
@ -417,12 +421,11 @@ class FreqtradeBot(object):
|
|||||||
client.restart() # restart workers to prevent side effects of memory leaks
|
client.restart() # restart workers to prevent side effects of memory leaks
|
||||||
|
|
||||||
total_time = (time.time() - loop_start_time)
|
total_time = (time.time() - loop_start_time)
|
||||||
pairs_number = len(whitelist)
|
logger.info(log_msg_p1 + " %s " + log_msg_p2 + " %0.2fs", pairs_number, total_time)
|
||||||
print("Done gathering histories and checking signals for " + str(pairs_number) + " \
|
|
||||||
pairs of whitelist in " + str(total_time) + " seconds")
|
|
||||||
|
|
||||||
else: # Synchronous single threaded LOOP
|
else: # Synchronous single threaded LOOP
|
||||||
# Pick pair based on buy signals
|
# Pick pair based on buy signals
|
||||||
|
loop_start_time = time.time()
|
||||||
for _pair in whitelist:
|
for _pair in whitelist:
|
||||||
thistory = self.exchange.get_candle_history(_pair, interval)
|
thistory = self.exchange.get_candle_history(_pair, interval)
|
||||||
(buy, sell) = self.strategy.get_signal(_pair, interval, thistory)
|
(buy, sell) = self.strategy.get_signal(_pair, interval, thistory)
|
||||||
@ -437,6 +440,10 @@ class FreqtradeBot(object):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
return self.execute_buy(_pair, stake_amount)
|
return self.execute_buy(_pair, stake_amount)
|
||||||
|
|
||||||
|
total_time = (time.time() - loop_start_time)
|
||||||
|
logger.info(log_msg_p1 + " %s " + log_msg_p2 + " %0.2fs", pairs_number, total_time)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _check_depth_of_market_buy(self, pair: str, conf: Dict) -> bool:
|
def _check_depth_of_market_buy(self, pair: str, conf: Dict) -> bool:
|
||||||
|
Loading…
Reference in New Issue
Block a user