Skip to content

Commit aa65a84

Browse files
committed
Fixed profit percentage calculation
1 parent 8df3029 commit aa65a84

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

MyCryptoMonitor/Forms/MainForm.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MyCryptoMonitor/Forms/MainForm.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ private void UpdateCoins(string cryptoCompareResponse, string coinMarketCapRespo
270270
var totalPositiveProfitLabel = $"{MainService.CurrencySymbol}{totalPostivieProfits:0.00}";
271271
var totalOverallLabel = $"{MainService.CurrencySymbol}{totalOverall:0.00}";
272272
var totalInvested = $"{MainService.CurrencySymbol}{totalPaid:0.00}";
273-
var profitPercentage = $"{Math.Abs((1 - (totalOverall.SafeDivision(totalPaid))) * 100):0.00}%";
273+
var profitPercentage = $"{Math.Abs(((1 - totalPaid.SafeDivision(totalOverall))) * 100):0.00}%";
274274

275275
Invoke((MethodInvoker)delegate
276276
{

0 commit comments

Comments
 (0)