Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: open trades more accurate asset indicator #571

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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