Skip to content

Commit

Permalink
don't clean stats if flag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Azulinho committed Sep 23, 2023
1 parent 47326f2 commit 59fd638
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1166,14 +1166,16 @@ def clear_all_coins_stats(self) -> None:
# if this flag is not set, and the all time high while the bot was running
# was considerably higher like 40K, the bot would keep on buying BTC
# for as long BTC was below 36K.
if self.clean_coin_stats_at_sale:
for coin in self.coins: # pylint: disable=C0206
if coin not in self.wallet:
self.clear_coin_stats(self.coins[coin])
for coin in self.coins: # pylint: disable=C0206
if coin not in self.wallet:
self.clear_coin_stats(self.coins[coin])

def clear_coin_stats(self, coin: Coin) -> None:
"""clear important coin stats such as max, min price for a coin"""

if not self.clean_coin_stats_at_sale:
return

# This where we reset all coin prices when CLEAR_COIN_STATS_AT_SALE
# is set.
# We reset the values for :
Expand Down

0 comments on commit 59fd638

Please sign in to comment.