fixed partial profit reset
This commit is contained in:
parent
e88ed99d6b
commit
559b95819a
|
|
@ -756,6 +756,9 @@ class trader:
|
|||
else:
|
||||
profit = filled_order["cost"]-self.status.get_quote_spent()-self.status.get_fees_paid_in_quote()-self.parse_fees(filled_order)[1]
|
||||
profit+=self.status.get_partial_profit()
|
||||
|
||||
#Reset partial profit
|
||||
self.status.set_partial_profit(0)
|
||||
|
||||
#Checks if some base was left over.
|
||||
base_profit = max(self.status.get_base_bought()-filled_order["filled"],0) #To avoid negative numbers in base_profit
|
||||
|
|
|
|||
Loading…
Reference in New Issue