error fix in take_profit_routine

This commit is contained in:
Nicolás Sánchez 2025-03-07 14:41:32 -03:00
parent 23c708d5c1
commit 589a5d1fd1
3 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,7 @@
2025.03.04.
2025.03.07:
. Error fix in take_profit_routine.
2025.03.04:
. Error fix in add_quote.
. Error fix in last_call.
. Fixed a bug in switch_quote_currency that prevented the new config and status files to be written to disk.

View File

@ -16,7 +16,7 @@ import exchange_wrapper
import trader
version = "2025.03.04"
version = "2025.03.07"
'''
Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

View File

@ -743,7 +743,7 @@ class trader:
self.broker.logger.log_this(f"Old safety order is partially filled, ID: {old_so_order['id']}",1,self.config.get_pair())
self.status.update_deal_order_history(old_so_order)
self.status.set_base_bought(self.status.get_base_bought() + old_so_order["filled"] - self.parse_fees(old_so_order)[0])
self.status.set_quote_spent(self.status.get_quote_spent + old_so_order["cost"])
self.status.set_quote_spent(self.status.get_quote_spent() + old_so_order["cost"])
if not self.broker.check_for_duplicate_profit_in_db(filled_order):
self.status.set_pause_reason("calculating profit")