From 4fdd0ed112598fd1057aad77e9b7d856fa45987b Mon Sep 17 00:00:00 2001 From: djbadders <34887832+djbadders@users.noreply.github.com> Date: Wed, 17 Feb 2021 15:28:13 +0000 Subject: [PATCH] Fix issue with Sales Analyzer showing no TCV --- Monitor/Pages/SalesAnalyzer.cshtml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Monitor/Pages/SalesAnalyzer.cshtml.cs b/Monitor/Pages/SalesAnalyzer.cshtml.cs index 9f74924..37725f3 100644 --- a/Monitor/Pages/SalesAnalyzer.cshtml.cs +++ b/Monitor/Pages/SalesAnalyzer.cshtml.cs @@ -161,7 +161,7 @@ namespace Monitor.Pages double AvailableBalance = PTData.GetCurrentBalance(); foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in PTData.DCALog) { - totalCurrentValue = totalCurrentValue + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage); + totalCurrentValue = totalCurrentValue + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1); } totalCurrentValue = totalCurrentValue + AvailableBalance; }