From 314d60792eb047fea5268a5b893512fecad59fd8 Mon Sep 17 00:00:00 2001 From: falsycat Date: Thu, 3 Aug 2023 02:52:23 +0900 Subject: [PATCH] fix an issue that the MM-algorithm dies after losscut --- algo/mm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algo/mm.py b/algo/mm.py index 7ecd286..93adc67 100644 --- a/algo/mm.py +++ b/algo/mm.py @@ -66,8 +66,8 @@ class MM: logging.info(f"-cut (change: {change}, pos: {pos} -> 0)") if posCut: logging.info(f"+cut (change: {change}, pos: {pos} -> 0)") - self._lastBuy = None - self._lastSell = None + self._lastBuy = "" + self._lastSell = "" sell_amount = pos * lot if sell_amount > 0: await self._player.orderMarketSell(self._pair.names, amount=sell_amount)