From 9a38b7a19407b6d46878d4b34d12334ec082858e Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Mon, 1 Feb 2021 02:29:15 +0900 Subject: [PATCH] IgnoreOutlier --- Core/DataObjects/PTMagicData.cs | 2 +- Core/MarketAnalyzer/BaseAnalyzer.cs | 4 ++-- Monitor/Pages/SettingsAnalyzer.cshtml.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/DataObjects/PTMagicData.cs b/Core/DataObjects/PTMagicData.cs index 3a98e25..bee52ca 100644 --- a/Core/DataObjects/PTMagicData.cs +++ b/Core/DataObjects/PTMagicData.cs @@ -147,7 +147,7 @@ namespace Core.Main.DataObjects.PTMagicData public string AllowedMarkets { get; set; } = ""; [DefaultValue(0)] - public int IgnoreOutlier { get; set; } = 0; + public int TrendThreshold { get; set; } = 0; [DefaultValue(true)] public bool ExcludeMainCurrency { get; set; } = true; diff --git a/Core/MarketAnalyzer/BaseAnalyzer.cs b/Core/MarketAnalyzer/BaseAnalyzer.cs index 6bfaff2..b60d0f0 100644 --- a/Core/MarketAnalyzer/BaseAnalyzer.cs +++ b/Core/MarketAnalyzer/BaseAnalyzer.cs @@ -394,9 +394,9 @@ namespace Core.MarketAnalyzer int trendChangeCount = marketTrendChanges.Count; foreach (MarketTrendChange marketTrendChange in marketTrendChanges) { - if (marketTrend.IgnoreOutlier != 0) + if (marketTrend.TrendThreshold != 0) { - if ((marketTrendChange.TrendChange > marketTrend.IgnoreOutlier) || (marketTrendChange.TrendChange < (marketTrend.IgnoreOutlier * -1))) + if ((marketTrendChange.TrendChange > marketTrend.TrendThreshold) || (marketTrendChange.TrendChange < (marketTrend.TrendThreshold * -1))) { log.DoLogInfo("Market trend '" + marketTrend.Name + "' is ignoring " + marketTrendChange.Market + " for exceeding TrendThreshold."); trendChangeCount += -1; diff --git a/Monitor/Pages/SettingsAnalyzer.cshtml.cs b/Monitor/Pages/SettingsAnalyzer.cshtml.cs index 86a09b4..0fd8bb9 100644 --- a/Monitor/Pages/SettingsAnalyzer.cshtml.cs +++ b/Monitor/Pages/SettingsAnalyzer.cshtml.cs @@ -77,7 +77,7 @@ namespace Monitor.Pages mt.TrendCurrency = HttpContext.Request.Form[mtFormKey + "TrendCurrency"]; mt.IgnoredMarkets = HttpContext.Request.Form[mtFormKey + "IgnoredMarkets"]; mt.AllowedMarkets = HttpContext.Request.Form[mtFormKey + "AllowedMarkets"]; - mt.IgnoreOutlier = SystemHelper.TextToInteger(HttpContext.Request.Form[mtFormKey + "IgnoreOutlier"], mt.IgnoreOutlier); + mt.TrendThreshold = SystemHelper.TextToInteger(HttpContext.Request.Form[mtFormKey + "TrendThreshold"], mt.TrendThreshold); mt.DisplayGraph = HttpContext.Request.Form[mtFormKey + "DisplayGraph"].Equals("on"); mt.ExcludeMainCurrency = HttpContext.Request.Form[mtFormKey + "ExcludeMainCurrency"].Equals("on");