IgnoreOutlier

This commit is contained in:
HojouFotytu 2021-02-01 02:29:15 +09:00
parent db05efbd7b
commit 9a38b7a194
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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");