fix an issue that the MM-algorithm dies after losscut
This commit is contained in:
parent
ccb8c2967c
commit
314d60792e
@ -66,8 +66,8 @@ class MM:
|
|||||||
logging.info(f"-cut (change: {change}, pos: {pos} -> 0)")
|
logging.info(f"-cut (change: {change}, pos: {pos} -> 0)")
|
||||||
if posCut:
|
if posCut:
|
||||||
logging.info(f"+cut (change: {change}, pos: {pos} -> 0)")
|
logging.info(f"+cut (change: {change}, pos: {pos} -> 0)")
|
||||||
self._lastBuy = None
|
self._lastBuy = ""
|
||||||
self._lastSell = None
|
self._lastSell = ""
|
||||||
sell_amount = pos * lot
|
sell_amount = pos * lot
|
||||||
if sell_amount > 0:
|
if sell_amount > 0:
|
||||||
await self._player.orderMarketSell(self._pair.names, amount=sell_amount)
|
await self._player.orderMarketSell(self._pair.names, amount=sell_amount)
|
||||||
|
Loading…
Reference in New Issue
Block a user