From 433813115fcae706a2c7efa56edbf9cb992ab8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Sun, 31 Aug 2025 23:22:25 -0300 Subject: [PATCH] fixed partial profit reset mkII --- trader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trader.py b/trader.py index b947c80..b43b789 100755 --- a/trader.py +++ b/trader.py @@ -943,7 +943,7 @@ class trader: #self.status.set_base_bought(old_tp_order["remaining"]) # Partial profit calculation if not self.config.get_is_short(): - current_deal_price = self.status.get_base_bought()/self.status.get_quote_spent() + current_deal_price = self.status.get_quote_spent()/self.status.get_base_bought() self.status.set_partial_profit(self.status.get_partial_profit()+old_tp_order["cost"]-(old_tp_order["filled"]*current_deal_price)-self.parse_fees(old_tp_order)[1]) self.update_status(True) self.status.set_base_bought(self.status.get_base_bought() - old_tp_order["filled"] - self.parse_fees(old_tp_order)[0])