Skip to content

Commit

Permalink
fix: open trades more accurate asset indicator (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
uhliksk authored Jan 3, 2023
1 parent 45914a5 commit 87c81f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.

- Fixed sorting symbols open trades first by [@uhliksk](https://github.com/uhliksk) - [#564](https://github.com/chrisleekr/binance-trading-bot/pull/564)
- Fixed the issue that cannot export huge logs - [#561](https://github.com/chrisleekr/binance-trading-bot/pull/561), [#567](https://github.com/chrisleekr/binance-trading-bot/pull/567)
- Fixed the balance calculation to include dust balances by [@uhliksk](https://github.com/uhliksk) - [#571](https://github.com/chrisleekr/binance-trading-bot/pull/571)

Thanks [@uhliksk](https://github.com/uhliksk) for your great contributions. 💯 :heart:

Expand Down
9 changes: 7 additions & 2 deletions public/js/ProfitLossWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,14 @@ class ProfitLossWrapper extends React.Component {
: 0;

const quoteAssetTotal =
profitAndLoss.amount + +profitAndLoss.free + +profitAndLoss.locked;
profitAndLoss.estimatedBalance -
+profitAndLoss.profit +
+profitAndLoss.free +
+profitAndLoss.locked;
const openTradesRatio = quoteAssetTotal
? (profitAndLoss.amount / quoteAssetTotal) * 100
? ((profitAndLoss.estimatedBalance - +profitAndLoss.profit) /
quoteAssetTotal) *
100
: 0;

return (
Expand Down

0 comments on commit 87c81f6

Please sign in to comment.