fix an issue that the MM-algorithm dies after losscut

This commit is contained in:
falsycat 2023-08-03 02:52:23 +09:00
parent ccb8c2967c
commit 314d60792e
1 changed files with 2 additions and 2 deletions

View File

@ -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)