From 978dd8197193d141b32355afc814b986241f93ba Mon Sep 17 00:00:00 2001 From: DogsTailFarmer Date: Sun, 26 Nov 2023 20:43:04 +0300 Subject: [PATCH] 2.0.1 --- CHANGELOG.md | 7 +++++++ martin_binance/executor.py | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8768f3..b2f2842 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 2.0.1 - 2023-11-26 +### Fix +* "Groggy" state after start canceling grid before update it + +### Update +* Improved calc_over_price() + ## 2.0.0.post2 - 2023-11-24 ### Fix * Exception buffered_orders: 'NoneType' object is not subscriptable #68 diff --git a/martin_binance/executor.py b/martin_binance/executor.py index 0c2c5c6..e541be3 100755 --- a/martin_binance/executor.py +++ b/martin_binance/executor.py @@ -1900,7 +1900,12 @@ def calc_over_price(self, 'amount_first_grid': amount_first_grid, 'min_delta': min_delta, 'amount_min': amount_min} - over_price, msg = solve(self.calc_grid, reverse_target_amount, over_price_coarse, max_err, **params) + while True: + over_price, msg = solve(self.calc_grid, reverse_target_amount, over_price_coarse, max_err, **params) + if over_price or self.order_q <= ORDER_Q: + break + self.order_q -= 1 + self.message_log(msg) if over_price == 0: self.message_log("Can't calculate over price for reverse cycle,"