@@ -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
From 35f8aeeb31b4430e394b9cababe77caa047c6005 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Sat, 1 Jul 2023 12:44:26 +0900
Subject: [PATCH 7/8] BinFutures incorrect markets
---
Core/MarketAnalyzer/BinanceFutures.cs | 11 +++++++++--
Monitor/Pages/MarketAnalyzer.cshtml | 3 +++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Core/MarketAnalyzer/BinanceFutures.cs b/Core/MarketAnalyzer/BinanceFutures.cs
index 85e2117..b27beb7 100644
--- a/Core/MarketAnalyzer/BinanceFutures.cs
+++ b/Core/MarketAnalyzer/BinanceFutures.cs
@@ -71,7 +71,7 @@ namespace Core.MarketAnalyzer
//New variables for filtering out bad markets
float marketLastPrice = currencyTicker["lastPrice"].ToObject();
float marketVolume = currencyTicker["volume"].ToObject();
- if (marketLastPrice > 0 && marketVolume > 0)
+ if (marketLastPrice > 0 && marketVolume > 0 && marketName.EndsWith(mainMarket))
{
// Set last values in case any error occurs
@@ -92,8 +92,15 @@ namespace Core.MarketAnalyzer
}
else
{
- //Let the user know that the problem market was ignored.
+ //Let the user know that a problem market was ignored.
+ if (!marketName.EndsWith(mainMarket))
+ {
+ log.DoLogInfo("BinanceFutures - Incorrect base currency: " + marketName + " ignored");
+ }
+ else
+ {
log.DoLogInfo("BinanceFutures - Ignoring bad market data for " + marketName);
+ }
}
}
diff --git a/Monitor/Pages/MarketAnalyzer.cshtml b/Monitor/Pages/MarketAnalyzer.cshtml
index 15bd1d1..826d417 100644
--- a/Monitor/Pages/MarketAnalyzer.cshtml
+++ b/Monitor/Pages/MarketAnalyzer.cshtml
@@ -250,6 +250,8 @@ else
@foreach (string market in Model.Summary.MarketSummary.Keys.OrderBy(m => m)) {
+ if (market.EndsWith(Model.Summary.MainMarket))
+ {
Core.Main.DataObjects.PTMagicData.MarketPairSummary mps = Model.Summary.MarketSummary[market];
int marketTrendsDisplayed = 0;
@@ -294,6 +296,7 @@ else
|
}
+ }
}
From d1370bf2890651931b995b57d91a6781e06e2e2b Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Sat, 1 Jul 2023 14:45:51 +0900
Subject: [PATCH 8/8] removed obsolete permission flag
---
Monitor/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Monitor/Program.cs b/Monitor/Program.cs
index 4d9066d..607610a 100644
--- a/Monitor/Program.cs
+++ b/Monitor/Program.cs
@@ -10,7 +10,7 @@ namespace Monitor
public class Program
{
// Main entry point
- [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
+ //[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
public static void Main(string[] args)
{
// Register a global exception handler