Skip to content

Commit

Permalink
Merge pull request #70 from Codaone/slider-fix
Browse files Browse the repository at this point in the history
Change slider logic in relative orders
  • Loading branch information
mikakoi committed Apr 11, 2018
2 parents d9e81d4 + 9325a00 commit 417bb2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dexbot/strategies/relative_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ def update_gui_profit(self):
self['profit'] = profit

def update_gui_slider(self):
ticker = self.market.ticker()
latest_price = ticker.get('latest').get('price')
total_balance = self.total_balance(self['order_ids'])
total = total_balance['quote'] + total_balance['base']
total = (total_balance['quote'] * latest_price) + total_balance['base']

if not total: # Prevent division by zero
percentage = 50
Expand Down

0 comments on commit 417bb2a

Please sign in to comment.