Skip to content

Commit

Permalink
3.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
DogsTailFarmer committed Jun 26, 2024
1 parent c796d64 commit a84dfc7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 3.0.8 - 2024-06-26
### Added new features
* Continue interrupted grid update cycle after restart

### Update
* Dependency

## 3.0.7 - 2024-05-02
### Fix
* `Docker`: server-client deployment functionality restored (`exchanges-wrapper` and `martin-binance`), also for Windows
Expand Down
2 changes: 1 addition & 1 deletion martin_binance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "3.0.7"
__version__ = "3.0.8"
__maintainer__ = "Jerry Fedorenko"
__contact__ = "https://github.com/DogsTailFarmer"

Expand Down
Empty file modified martin_binance/backtest/optimizer.py
100644 → 100755
Empty file.
10 changes: 8 additions & 2 deletions martin_binance/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__author__ = "Jerry Fedorenko"
__copyright__ = "Copyright © 2021 Jerry Fedorenko aka VM"
__license__ = "MIT"
__version__ = "3.0.7"
__version__ = "3.0.8"
__maintainer__ = "Jerry Fedorenko"
__contact__ = 'https://github.com/DogsTailFarmer'
##################################################################
Expand Down Expand Up @@ -106,7 +106,7 @@ def __init__(self, call_super=True):
self.first_run = True # -
self.grid_only_restart = 0 # + Time to restart GRID_ONLY mode
self.grid_remove = None # + Flag when starting cancel grid orders
self.grid_update_started = None # - Flag when grid update process started
self.grid_update_started = None # + Flag when grid update process started
self.last_ticker_update = 0 # -
self.martin = Decimal(0) # + Operational increment volume of orders in the grid
self.order_q = None # + Adaptive order quantity
Expand Down Expand Up @@ -227,6 +227,7 @@ def save_strategy_state(self) -> Dict[str, str]:
'deposit_second': json.dumps(self.deposit_second),
'grid_only_restart': json.dumps(self.grid_only_restart),
'grid_remove': json.dumps(self.grid_remove),
'grid_update_started': json.dumps(self.grid_update_started),
'initial_first': json.dumps(self.initial_first),
'initial_reverse_first': json.dumps(self.initial_reverse_first),
'initial_reverse_second': json.dumps(self.initial_reverse_second),
Expand Down Expand Up @@ -511,6 +512,7 @@ def restore_strategy_state(self, strategy_state: Dict[str, str] = None, restore=
self.command = json.loads(strategy_state.get('command'))
self.grid_remove = json.loads(strategy_state.get('grid_remove', 'null'))
self.grid_only_restart = json.loads(strategy_state.get('grid_only_restart', "0"))
self.grid_update_started = json.loads(strategy_state.get('grid_update_started', 'null'))
#
self.cycle_buy = json.loads(strategy_state.get('cycle_buy'))
self.cycle_buy_count = json.loads(strategy_state.get('cycle_buy_count'))
Expand Down Expand Up @@ -585,6 +587,10 @@ def restore_strategy_state(self, strategy_state: Dict[str, str] = None, restore=
elif not grid_open_orders_len and self.orders_hold:
self.message_log("Restore, no grid orders, place from hold now", tlg=True)
self.place_grid_part()
elif self.grid_update_started and not self.orders_grid and not self.orders_hold and not self.orders_save:
self.message_log("Continue update grid", tlg=True)
self.grid_remove = True
self.cancel_grid()
elif not self.orders_grid and not self.orders_hold and not self.orders_save and not self.tp_order_id:
self.message_log("Restore, Restart", tlg=True)
self.start()
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ dynamic = ["version", "description"]
requires-python = ">=3.9"

dependencies = [
"exchanges-wrapper==2.1.12",
"exchanges-wrapper==2.1.13",
"jsonpickle==3.0.2",
"psutil==5.9.6",
"requests==2.31.0",
"requests==2.32.0",
"libtmux==0.23.2",
"colorama==0.4.6",
"prometheus-client==0.18.0",
Expand All @@ -30,8 +30,8 @@ dependencies = [
"dash>=2.15.0",
"future==0.18.3",
"inquirer==3.1.3",
"scikit-learn==1.3.2",
"tqdm==4.66.1",
"scikit-learn==1.5.0",
"tqdm==4.66.3",
"ujson~=5.9.0",
"orjson~=3.9.15",
"pyarrow~=14.0.2",
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exchanges-wrapper==2.1.12
exchanges-wrapper==2.1.13
jsonpickle==3.0.2
psutil==5.9.6
requests==2.31.0
requests==2.32.0
libtmux==0.23.2
colorama==0.4.6
prometheus-client==0.18.0
Expand All @@ -11,8 +11,8 @@ pandas==2.1.2
dash>=2.15.0
future==0.18.3
inquirer==3.1.3
scikit-learn==1.3.2
tqdm==4.66.1
scikit-learn==1.5.0
tqdm==4.66.3
ujson~=5.9.0
orjson~=3.9.15
pyarrow~=14.0.2
Expand Down

0 comments on commit a84dfc7

Please sign in to comment.