diff --git a/Monitor/Pages/BagAnalyzer.cshtml b/Monitor/Pages/BagAnalyzer.cshtml index 07e6e01..87c1093 100644 --- a/Monitor/Pages/BagAnalyzer.cshtml +++ b/Monitor/Pages/BagAnalyzer.cshtml @@ -29,7 +29,7 @@ Market - Value + Value DCA Buy Strats BS Value @@ -98,4 +98,4 @@ interval = setInterval(function () { loadBagList(); }, @Model.PTMagicConfiguration.GeneralSettings.Monitor.BagAnalyzerRefreshSeconds * 1000); }); -} +} \ No newline at end of file diff --git a/Monitor/Pages/_get/BagList.cshtml b/Monitor/Pages/_get/BagList.cshtml index f48b16a..cc37519 100644 --- a/Monitor/Pages/_get/BagList.cshtml +++ b/Monitor/Pages/_get/BagList.cshtml @@ -11,6 +11,7 @@ } @foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in dcaLogResult) { + // Loop through the pairs preparing the data for display Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null; if (Model.Summary.MarketSummary.ContainsKey(dcaLogEntry.Market)) { mps = Model.Summary.MarketSummary[dcaLogEntry.Market]; @@ -75,28 +76,44 @@ string triggerSellValueText = Core.ProfitTrailer.StrategyHelper.GetTriggerValueText(Model.Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, dcaLogEntry.BBTrigger, dcaLogEntry.SellTrigger, 0, true); double currentFiatValue = Math.Round(dcaLogEntry.Amount * dcaLogEntry.CurrentPrice * Model.Summary.MainMarketPrice, 2); - + // Check for when PT loses the value of a pair + bool lostValue = false; + lostValue = (dcaLogEntry.TotalCost == 0.0) || (dcaLogEntry.AverageBuyPrice == 0.0); + + // Render the row + + // Market @if (mps != null && (mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0)) { @dcaLogEntry.Market } else { @dcaLogEntry.Market } - @Html.Raw(@dcaLogEntry.TotalCost.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) + "(" + Model.MainFiatCurrencySymbol + currentFiatValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + ")") + + // Value + @Html.Raw(@dcaLogEntry.TotalCost.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) + " (" + Model.MainFiatCurrencySymbol + currentFiatValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + ")") + + // DCA level @if (dcaLogEntry.BoughtTimes > 0) { @dcaLogEntry.BoughtTimes; } + + // Buy strats @if (buyDisabled) { @Html.Raw(buyStrategyText) } else { @Html.Raw(buyStrategyText) } + + // BS Value @if (!buyDisabled) { @Html.Raw(currentBuyValueText) } + + // BS Trigger @if (!buyDisabled && dcaLogEntry.BoughtTimes < Model.Summary.DCALevels) { @Html.Raw(triggerBuyValueText) } else { @@ -106,13 +123,29 @@ Disabled! } } - @dcaLogEntry.ProfitPercent.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% + + // Percent + @if(!@lostValue) + { + @dcaLogEntry.ProfitPercent.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% + } + else + { + No Value! + } + + // Sell Strats @Html.Raw(sellStrategyText) + + // SST @Html.Raw(triggerSellValueText) + + // Bid and avg price @dcaLogEntry.CurrentPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))
@dcaLogEntry.AverageBuyPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) + // Details Details } diff --git a/Monitor/Pages/_get/DashboardTop.cshtml b/Monitor/Pages/_get/DashboardTop.cshtml index 527dba2..6b746d4 100644 --- a/Monitor/Pages/_get/DashboardTop.cshtml +++ b/Monitor/Pages/_get/DashboardTop.cshtml @@ -93,6 +93,7 @@ @foreach (Core.Main.DataObjects.PTMagicData.DCALogData dcaLogEntry in Model.PTData.DCALog.OrderByDescending(d => d.ProfitPercent).Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBagEntries)) { + // Loop through the pairs preparing the data for display Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null; if (Model.Summary.MarketSummary.ContainsKey(dcaLogEntry.Market)) { mps = Model.Summary.MarketSummary[dcaLogEntry.Market]; @@ -131,14 +132,20 @@ string sellStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, isSellStrategyTrue, isTrailingSellActive); - + // Check for when PT loses the value of a pair + bool lostValue = false; + lostValue = (dcaLogEntry.TotalCost == 0.0) || (dcaLogEntry.AverageBuyPrice == 0.0); + + // Render the row + @if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0) { @dcaLogEntry.Market } else { @dcaLogEntry.Market } - @Html.Raw(dcaLogEntry.TotalCost.ToString("#,#0.000000", new System.Globalization.CultureInfo("en-US"))) + @Html.Raw(dcaLogEntry.TotalCost.ToString("#,#0.000000", new System.Globalization.CultureInfo("en-US"))) + @if (dcaEnabled) { @if (dcaLogEntry.BoughtTimes > 0) { @@ -148,6 +155,7 @@ Disabled! } + @if (buyDisabled) { @Html.Raw(buyStrategyText) } else { @@ -160,7 +168,16 @@ } - @dcaLogEntry.ProfitPercent.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% + + @if(!@lostValue) + { + @dcaLogEntry.ProfitPercent.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% + } + else + { + No Value! + } + } @@ -192,4 +209,4 @@ })(jQuery); - + \ No newline at end of file diff --git a/Monitor/wwwroot/assets/css/custom.css b/Monitor/wwwroot/assets/css/custom.css index 0865297..f17ec61 100644 --- a/Monitor/wwwroot/assets/css/custom.css +++ b/Monitor/wwwroot/assets/css/custom.css @@ -141,6 +141,16 @@ display: none; } +.errorRow +{ + background-color: #550000; +} + +.errorRow a +{ + color: white; +} + .table-scroll-hori { display: block; width: 100%;