IgnoreOutlier
This commit is contained in:
parent
db05efbd7b
commit
9a38b7a194
|
@ -147,7 +147,7 @@ namespace Core.Main.DataObjects.PTMagicData
|
||||||
public string AllowedMarkets { get; set; } = "";
|
public string AllowedMarkets { get; set; } = "";
|
||||||
|
|
||||||
[DefaultValue(0)]
|
[DefaultValue(0)]
|
||||||
public int IgnoreOutlier { get; set; } = 0;
|
public int TrendThreshold { get; set; } = 0;
|
||||||
|
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
||||||
public bool ExcludeMainCurrency { get; set; } = true;
|
public bool ExcludeMainCurrency { get; set; } = true;
|
||||||
|
|
|
@ -394,9 +394,9 @@ namespace Core.MarketAnalyzer
|
||||||
int trendChangeCount = marketTrendChanges.Count;
|
int trendChangeCount = marketTrendChanges.Count;
|
||||||
foreach (MarketTrendChange marketTrendChange in marketTrendChanges)
|
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.");
|
log.DoLogInfo("Market trend '" + marketTrend.Name + "' is ignoring " + marketTrendChange.Market + " for exceeding TrendThreshold.");
|
||||||
trendChangeCount += -1;
|
trendChangeCount += -1;
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace Monitor.Pages
|
||||||
mt.TrendCurrency = HttpContext.Request.Form[mtFormKey + "TrendCurrency"];
|
mt.TrendCurrency = HttpContext.Request.Form[mtFormKey + "TrendCurrency"];
|
||||||
mt.IgnoredMarkets = HttpContext.Request.Form[mtFormKey + "IgnoredMarkets"];
|
mt.IgnoredMarkets = HttpContext.Request.Form[mtFormKey + "IgnoredMarkets"];
|
||||||
mt.AllowedMarkets = HttpContext.Request.Form[mtFormKey + "AllowedMarkets"];
|
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.DisplayGraph = HttpContext.Request.Form[mtFormKey + "DisplayGraph"].Equals("on");
|
||||||
mt.ExcludeMainCurrency = HttpContext.Request.Form[mtFormKey + "ExcludeMainCurrency"].Equals("on");
|
mt.ExcludeMainCurrency = HttpContext.Request.Form[mtFormKey + "ExcludeMainCurrency"].Equals("on");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue