Skip to content

Commit db1264c

Browse files
committed
fix: Apply latch_on_stop_loss config to emergency exits
1 parent 6a98184 commit db1264c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

market_maker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,9 @@ def tick(self) -> None:
377377
emergency_order.price,
378378
)
379379
orders.append(emergency_order)
380-
self.risk_off = self.config.risk_off_after_stop
381-
LOGGER.warning("[DEBUG_RISK_OFF] Global risk_off latch has been ACTIVATED due to emergency exit.")
380+
if self.config.latch_on_stop_loss:
381+
self.risk_off = self.config.risk_off_after_stop
382+
LOGGER.warning("[DEBUG_RISK_OFF] Global risk_off latch has been ACTIVATED due to emergency exit.")
382383
self.last_midpoints[token.token_id] = quote.mid
383384
continue
384385

0 commit comments

Comments
 (0)