diff --git a/Core/Core.csproj b/Core/Core.csproj index ab8a35b..6d671c2 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -1,18 +1,18 @@ - netcoreapp3.1 + netcoreapp7.0 - - + + - - - - + + + + diff --git a/Core/MarketAnalyzer/Binance.cs b/Core/MarketAnalyzer/Binance.cs index 3d28203..1317075 100644 --- a/Core/MarketAnalyzer/Binance.cs +++ b/Core/MarketAnalyzer/Binance.cs @@ -360,12 +360,12 @@ namespace Core.MarketAnalyzer log.DoLogDebug("Binance - Getting ticks for '" + markets.Count + "' markets"); ConcurrentDictionary> marketTicks = new ConcurrentDictionary>(); - int ParallelThrottle = 4; - if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 50) + int ParallelThrottle = 2; + if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 6) { - ParallelThrottle = 2; + ParallelThrottle = 1; log.DoLogInfo("----------------------------------------------------------------------------"); - log.DoLogInfo("StoreDataMaxHours is greater than 50. Historical data requests will be"); + log.DoLogInfo("StoreDataMaxHours is greater than 6. Historical data requests will be"); log.DoLogInfo("throttled to avoid exceeding exchange request limits. This initial "); log.DoLogInfo("run could take more than 30 minutes. Please go outside for a walk..."); log.DoLogInfo("----------------------------------------------------------------------------"); diff --git a/Core/MarketAnalyzer/BinanceFutures.cs b/Core/MarketAnalyzer/BinanceFutures.cs index 1552a66..85e2117 100644 --- a/Core/MarketAnalyzer/BinanceFutures.cs +++ b/Core/MarketAnalyzer/BinanceFutures.cs @@ -357,12 +357,12 @@ namespace Core.MarketAnalyzer log.DoLogDebug("BinanceFutures - Getting ticks for '" + markets.Count + "' markets"); ConcurrentDictionary> marketTicks = new ConcurrentDictionary>(); - int ParallelThrottle = 4; - if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 50) + int ParallelThrottle = 2; + if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 6) { - ParallelThrottle = 2; + ParallelThrottle = 1; log.DoLogInfo("----------------------------------------------------------------------------"); - log.DoLogInfo("StoreDataMaxHours is greater than 50. Historical data requests will be"); + log.DoLogInfo("StoreDataMaxHours is greater than 6. Historical data requests will be"); log.DoLogInfo("throttled to avoid exceeding exchange data request limits. This initial "); log.DoLogInfo("run could take more than 30 minutes. Please go outside for a walk..."); log.DoLogInfo("----------------------------------------------------------------------------"); diff --git a/Core/MarketAnalyzer/BinanceUS.cs b/Core/MarketAnalyzer/BinanceUS.cs index 0b09180..ad72827 100644 --- a/Core/MarketAnalyzer/BinanceUS.cs +++ b/Core/MarketAnalyzer/BinanceUS.cs @@ -370,12 +370,12 @@ namespace Core.MarketAnalyzer log.DoLogDebug("BinanceUS - Getting ticks for '" + markets.Count + "' markets"); ConcurrentDictionary> marketTicks = new ConcurrentDictionary>(); - int ParallelThrottle = 4; - if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 200) + int ParallelThrottle = 2; + if (systemConfiguration.AnalyzerSettings.MarketAnalyzer.StoreDataMaxHours > 6) { - ParallelThrottle = 2; + ParallelThrottle = 1; log.DoLogInfo("----------------------------------------------------------------------------"); - log.DoLogInfo("StoreDataMaxHours is greater than 200. Historical data requests will be"); + log.DoLogInfo("StoreDataMaxHours is greater than 6. Historical data requests will be"); log.DoLogInfo("throttled to avoid exceeding exchange data request limits. This initial "); log.DoLogInfo("run could take more than 30 minutes. Please go outside for a walk..."); log.DoLogInfo("----------------------------------------------------------------------------"); diff --git a/Monitor/Monitor.csproj b/Monitor/Monitor.csproj index ce2658c..a851ef0 100644 --- a/Monitor/Monitor.csproj +++ b/Monitor/Monitor.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1 + netcoreapp7.0 @@ -19,7 +19,7 @@ - + diff --git a/Monitor/Pages/_get/DashboardTop.cshtml b/Monitor/Pages/_get/DashboardTop.cshtml index 28435eb..3a0b262 100644 --- a/Monitor/Pages/_get/DashboardTop.cshtml +++ b/Monitor/Pages/_get/DashboardTop.cshtml @@ -111,6 +111,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]; } @@ -149,22 +150,26 @@ // Check for when PT loses the value of a pair bool lostValue = false; - lostValue = (dcaLogEntry.TotalCost == 0.0) || (dcaLogEntry.AverageBuyPrice == 0.0); + lostValue = !(sellStrategyText.Contains("WATCHMODE")) && !(sellStrategyText.Contains("PENDING")) && ((dcaLogEntry.TotalCost == 0.0) || (dcaLogEntry.AverageBuyPrice == 0.0)); // Profit percentage var profitPercentage = dcaLogEntry.ProfitPercent; - if (dcaLogEntry.SellStrategies != null) - { - var gainStrategy = dcaLogEntry.SellStrategies.FirstOrDefault(x => x.Name.Contains(" GAIN", StringComparison.InvariantCultureIgnoreCase)); - if (gainStrategy != null) - { - // Use the gain percentage value as it is accurate to what can be achieved with the order book! - profitPercentage = gainStrategy.CurrentValue; - } - } + // if (dcaLogEntry.SellStrategies != null) + // { + // var gainStrategy = dcaLogEntry.SellStrategies.FirstOrDefault(x => x.Name.Contains(" GAIN", StringComparison.InvariantCultureIgnoreCase)); + // if (gainStrategy != null) + // { + // // Use the gain percentage value as it is accurate to what can be achieved with the order book! + // profitPercentage = gainStrategy.CurrentValue; + // } + // } // Render the row + + if (!sellStrategyText.Contains("PENDING-BUY")) + { + @@ -207,8 +212,8 @@ @if (!@lostValue) { - @if (!sellStrategyText.Contains("WATCHMODE")) - { + //@if (!sellStrategyText.Contains("WATCHMODE")) + //{ @if (sellStrategyText.Contains("CROSSED")) // if leverage, recalculate profit target { @@ -222,17 +227,31 @@ leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)")); leverageValue = double.Parse(leverage); } - profitPercentage = profitPercentage * leverageValue; - double TargetGain = leverageValue * dcaLogEntry.TargetGainValue.Value; - @TargetGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% -
-
@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
- - } + //profitPercentage = profitPercentage * leverageValue; + + @if ( !(sellStrategyText.Contains("WATCHMODE")) && !(sellStrategyText.Contains("PENDING"))) + { + double TargetGain = leverageValue * dcaLogEntry.TargetGainValue.Value; + @TargetGain.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))% +
+
@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
+ + } + else + { + +
None
+
+
@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%
+ + } + + + //} } else { - No Value! + Lost Value! } @@ -243,6 +262,9 @@ Model.TotalBagCost = Model.TotalBagCost + dcaLogEntry.TotalCost; Model.TotalBagGain = Model.TotalBagGain + bagGain; } + + } + } Totals: diff --git a/PTMagic/PTMagic.csproj b/PTMagic/PTMagic.csproj index 10054ea..68d6734 100644 --- a/PTMagic/PTMagic.csproj +++ b/PTMagic/PTMagic.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + netcoreapp7.0 diff --git a/PTMagic/Program.cs b/PTMagic/Program.cs index a4be87c..c12762a 100644 --- a/PTMagic/Program.cs +++ b/PTMagic/Program.cs @@ -6,7 +6,7 @@ using Core.Helper; using Microsoft.Extensions.DependencyInjection; -[assembly: AssemblyVersion("2.5.12")] +[assembly: AssemblyVersion("2.6.1")] [assembly: AssemblyProduct("PT Magic")] namespace PTMagic