diff --git a/Core/Core.csproj b/Core/Core.csproj index 26bc68b..d9476f1 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -7,14 +7,14 @@ - - + + - - + + diff --git a/Core/DataObjects/PTMagicData.cs b/Core/DataObjects/PTMagicData.cs index 1a44711..09b8474 100644 --- a/Core/DataObjects/PTMagicData.cs +++ b/Core/DataObjects/PTMagicData.cs @@ -75,7 +75,7 @@ namespace Core.Main.DataObjects.PTMagicData public string TvStudyB { get; set; } = ""; public string TvStudyC { get; set; } = ""; public string TvStudyD { get; set; } = ""; - + public string RootUrl { get @@ -538,6 +538,8 @@ namespace Core.Main.DataObjects.PTMagicData public double BBTrigger { get; set; } public bool IsTrailing { get; set; } public bool IsTrue { get; set; } + public bool IsSom { get; set; } + public int TrueStrategyCount { get; set; } public string Market { get; set; } public double ProfitPercent { get; set; } public double CurrentPrice { get; set; } diff --git a/Core/DataObjects/ProfitTrailerData.cs b/Core/DataObjects/ProfitTrailerData.cs index 65a4601..2707a55 100644 --- a/Core/DataObjects/ProfitTrailerData.cs +++ b/Core/DataObjects/ProfitTrailerData.cs @@ -350,7 +350,7 @@ namespace Core.Main.DataObjects { foreach (buyLogData rbld in rawBuyLogData) { - BuyLogData buyLogData = new BuyLogData(); + BuyLogData buyLogData = new BuyLogData() {IsTrailing = false, IsTrue = false, IsSom = false, TrueStrategyCount = 0}; buyLogData.Market = rbld.market; buyLogData.ProfitPercent = rbld.profit; buyLogData.TriggerValue = rbld.triggerValue; @@ -387,6 +387,17 @@ namespace Core.Main.DataObjects buyStrategy.IsTrailing = bs.positive.IndexOf("trailing", StringComparison.InvariantCultureIgnoreCase) > -1; buyStrategy.IsTrue = bs.positive.IndexOf("true", StringComparison.InvariantCultureIgnoreCase) > -1; + // Is SOM? + buyLogData.IsSom = buyLogData.IsSom || buyStrategy.Name.Equals("som enabled", StringComparison.OrdinalIgnoreCase); + + // Is the pair trailing? + buyLogData.IsTrailing = buyLogData.IsTrailing || buyStrategy.IsTrailing; + buyLogData.IsTrue = buyLogData.IsTrue || buyStrategy.IsTrue; + + // True status strategy count total + buyLogData.TrueStrategyCount += buyStrategy.IsTrue ? 1 : 0; + + // Add buyLogData.BuyStrategies.Add(buyStrategy); } } diff --git a/Monitor/Pages/_get/BuyList.cshtml b/Monitor/Pages/_get/BuyList.cshtml index 5793cc9..373d1d0 100644 --- a/Monitor/Pages/_get/BuyList.cshtml +++ b/Monitor/Pages/_get/BuyList.cshtml @@ -41,7 +41,7 @@ } else { @buyLogEntry.Market } - @buyLogEntry.PercChange.ToString("#,#0.00") + @buyLogEntry.PercChange.ToString("#,#0.00")% @if (buyDisabled) { @Html.Raw(buyStrategyText) } else { diff --git a/Monitor/Pages/_get/DashboardTop.cshtml b/Monitor/Pages/_get/DashboardTop.cshtml index 5c88333..0bdbbc4 100644 --- a/Monitor/Pages/_get/DashboardTop.cshtml +++ b/Monitor/Pages/_get/DashboardTop.cshtml @@ -23,7 +23,13 @@ - @foreach (Core.Main.DataObjects.PTMagicData.BuyLogData buyLogEntry in Model.PTData.BuyLog.OrderByDescending(b => b.IsTrailing).ThenBy(b => b.CurrentValue).Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBuyEntries)) { + @foreach (Core.Main.DataObjects.PTMagicData.BuyLogData buyLogEntry in Model.PTData.BuyLog.OrderByDescending(b => b.IsTrailing). + ThenByDescending(b => b.IsTrue). + ThenByDescending(b => b.TrueStrategyCount). + ThenBy(b => b.IsSom). + ThenByDescending(b => b.PercChange). + Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxDashboardBuyEntries)) { + Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = null; if (Model.Summary.MarketSummary.ContainsKey(buyLogEntry.Market)) { mps = Model.Summary.MarketSummary[buyLogEntry.Market]; @@ -53,7 +59,7 @@ } else { @buyLogEntry.Market } - @buyLogEntry.PercChange.ToString("#,#0.00") + @buyLogEntry.PercChange.ToString("#,#0.00")% @if (buyDisabled) { @Html.Raw(buyStrategyText) } else { diff --git a/PTMagic/PTMagic.csproj b/PTMagic/PTMagic.csproj index cc19797..7daa1f1 100644 --- a/PTMagic/PTMagic.csproj +++ b/PTMagic/PTMagic.csproj @@ -11,17 +11,6 @@ $(MSBuildStartupDirectory)/PTMagic - - - - - - - - - - -