fix: use "other trades" logic for binance cross calc

This commit is contained in:
Matthias
2024-08-31 08:21:33 +02:00
parent 0d5919392e
commit ac8bc7dec2

View File

@@ -192,6 +192,9 @@ class Binance(Exchange):
mm_ex_1: float = 0.0
upnl_ex_1: float = 0.0
for trade in open_trades:
if trade["pair"] == pair:
# Only "other" trades are considered
continue
mm_ratio1, maint_amnt1 = self.get_maintenance_ratio_and_amt(
trade["pair"], trade["stake_amount"]
)