From 2ed63a8ade27d903652bf0afbb62a4bbe50519a0 Mon Sep 17 00:00:00 2001 From: Eirik Narjord Date: Thu, 19 Sep 2024 13:57:50 -0400 Subject: [PATCH] loss_allowance_pct is weighted by total_wallet_exposure_limit --- src/passivbot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/passivbot.py b/src/passivbot.py index 467825345..318d62497 100644 --- a/src/passivbot.py +++ b/src/passivbot.py @@ -1508,9 +1508,10 @@ def calc_unstucking_close(self, ideal_orders): calc_AU_allowance( np.array([x["pnl"] for x in self.pnls]), self.balance, - loss_allowance_pct=self.live_configs[symbol][pside][ + loss_allowance_pct=self.config["bot"][pside][ "unstuck_loss_allowance_pct" - ], + ] + * self.config["bot"][pside]["total_wallet_exposure_limit"], ) if len(self.pnls) > 0 else 0.0