diff --git a/Core/DataObjects/ProfitTrailerData.cs b/Core/DataObjects/ProfitTrailerData.cs index 045fe37..1def18e 100644 --- a/Core/DataObjects/ProfitTrailerData.cs +++ b/Core/DataObjects/ProfitTrailerData.cs @@ -101,6 +101,14 @@ namespace Core.Main.DataObjects } } + public List SellLogLast30Days + { + get + { + return _sellLog.FindAll(sl => sl.SoldDate.Date >= _dateTimeNow.DateTime.AddDays(-30).Date); + } + } + public List DCALog { get diff --git a/Monitor/Pages/_get/DashboardBottom.cshtml b/Monitor/Pages/_get/DashboardBottom.cshtml index 6b5b588..585f0cd 100644 --- a/Monitor/Pages/_get/DashboardBottom.cshtml +++ b/Monitor/Pages/_get/DashboardBottom.cshtml @@ -70,6 +70,13 @@ double last7DaysProfit = Model.PTData.SellLogLast7Days.Sum(s => s.Profit); double last7DaysProfitFiat = Math.Round(last7DaysProfit * Model.Summary.MainMarketPrice, 2); double last7DaysPercentGain = Math.Round(last7DaysProfit / last7DaysStartBalance * 100, 2); + + double last30DaysStartBalance = Model.PTData.GetSnapshotBalance(Model.DateTimeNow.DateTime.AddDays(-30)); + double last30DaysProfit = Model.PTData.SellLogLast30Days.Sum(s => s.Profit); + double last30DaysProfitFiat = Math.Round(last30DaysProfit * Model.Summary.MainMarketPrice, 2); + double last30DaysPercentGain = Math.Round(last30DaysProfit / last30DaysStartBalance * 100, 2); + } + } @@ -104,6 +111,13 @@ + + + + + + +
@Html.Raw(Model.MainFiatCurrencySymbol + last7DaysProfitFiat.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) @last7DaysPercentGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
Last 30 Days@Model.PTData.SellLogLast30Days.Count@last30DaysProfit.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))@Html.Raw(Model.MainFiatCurrencySymbol + last30DaysProfitFiat.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")))@last30DaysPercentGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
Total @Model.PTData.SellLog.Count