Merge pull request #264 from djbadders/develop

Leverage calculations issues fixed for distibution chart
This commit is contained in:
HojouFotytu 2021-02-18 00:47:45 +09:00 committed by GitHub
commit 137a1d7662
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -196,15 +196,15 @@ namespace Monitor.Pages
{ {
if (sellStrategyText.Contains("PENDING")) if (sellStrategyText.Contains("PENDING"))
{ {
PendingBalance = PendingBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage); PendingBalance = PendingBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
} }
else if (dcaLogEntry.BuyStrategies.Count > 0) else if (dcaLogEntry.BuyStrategies.Count > 0)
{ {
DCABalance = DCABalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage); DCABalance = DCABalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
} }
else else
{ {
PairsBalance = PairsBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage); PairsBalance = PairsBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
} }
} }
} }