fix: Calculate liquidation price only once the initial order filled

closes #11318
This commit is contained in:
Matthias
2025-02-05 18:13:52 +01:00
parent dbb9f225d0
commit b75eb85e66
+1
View File
@@ -35,6 +35,7 @@ def update_liquidation_prices(
open_trades: list[Trade] = Trade.get_open_trades() open_trades: list[Trade] = Trade.get_open_trades()
for t in open_trades: for t in open_trades:
if t.has_open_position:
# TODO: This should be done in a batch update # TODO: This should be done in a batch update
t.set_liquidation_price( t.set_liquidation_price(
exchange.get_liquidation_price( exchange.get_liquidation_price(