Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
VladKochetov007 committed Nov 17, 2021
1 parent 8d23e82 commit ad2bb3b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions quick_trade/trading_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,14 @@ def get_trading_predict(self,
bet_for_trading_on_client: Union[float, int] = np.inf,
) -> Dict[str, Union[str, float]]:
balance = self.client.get_balance(self.ticker.split('/')[1])
bet = (balance * 10) / (can_orders / deposit_part - TradingClient.cls_open_orders)
bet /= 10 # decimal analog
if bet > bet_for_trading_on_client_copy:
bet = bet_for_trading_on_client_copy
bet = bet_for_trading_on_client_copy
if bet_for_trading_on_client is not np.inf:
if TradingClient.cls_open_orders != can_orders:
bet = (balance * 10) / (can_orders / deposit_part - TradingClient.cls_open_orders)
bet /= 10 # decimal analog
self.__prev_bet = bet
else:
bet = self.__prev_bet
return super().get_trading_predict(bet_for_trading_on_client=bet)

def start_trading(pair, strat):
Expand Down
2 changes: 1 addition & 1 deletion quick_trade/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
calmar ratio: {}
max drawdown: {}%""" # .format(Trader.losses, Trader.trades, ...)

__version__: str = "6.9.7"
__version__: str = "6.9.8"
__author__: str = 'Vlad Kochetov'
__credits__: List[str] = [
"Hemerson Tacon -- Stack overflow",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with open('README.md') as file:
long_desc = file.read()

__version__ = "6.9.7"
__version__ = "6.9.8"

setup(
name='quick_trade',
Expand Down

0 comments on commit ad2bb3b

Please sign in to comment.