From ace96a632bf6c561a24cf5a0c87fdb24d37c6d5e Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Thu, 25 Mar 2021 22:34:53 +0900 Subject: [PATCH] Ignored/Allowed in SMS --- Core/Main/PTMagic.cs | 4 ++-- Core/MarketAnalyzer/BinanceFutures.cs | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs index c585351..4caa49a 100644 --- a/Core/Main/PTMagic.cs +++ b/Core/Main/PTMagic.cs @@ -1518,7 +1518,7 @@ namespace Core.Main // Check ignore markets List ignoredMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.IgnoredMarkets, ","); - if (ignoredMarkets.Contains(marketPair)) + if (ignoredMarkets.Any(marketPair.Contains)) { this.Log.DoLogDebug("'" + marketPair + "' - Is ignored in '" + marketSetting.SettingName + "'."); continue; @@ -1526,7 +1526,7 @@ namespace Core.Main // Check allowed markets List allowedMarkets = SystemHelper.ConvertTokenStringToList(marketSetting.AllowedMarkets, ","); - if (allowedMarkets.Count > 0 && !allowedMarkets.Contains(marketPair)) + if (allowedMarkets.Count > 0 && !allowedMarkets.Any(marketPair.Contains)) { this.Log.DoLogDebug("'" + marketPair + "' - Is not allowed in '" + marketSetting.SettingName + "'."); continue; diff --git a/Core/MarketAnalyzer/BinanceFutures.cs b/Core/MarketAnalyzer/BinanceFutures.cs index de1f962..1ba75a6 100644 --- a/Core/MarketAnalyzer/BinanceFutures.cs +++ b/Core/MarketAnalyzer/BinanceFutures.cs @@ -74,9 +74,7 @@ namespace Core.MarketAnalyzer //New variables for filtering out bad markets float marketLastPrice = currencyTicker["lastPrice"].ToObject(); float marketVolume = currencyTicker["volume"].ToObject(); - if (marketName.EndsWith(mainMarket, StringComparison.InvariantCultureIgnoreCase)) - { - if (marketLastPrice > 0 && marketVolume > 0) + if (marketLastPrice > 0 && marketVolume > 0) { // Set last values in case any error occurs @@ -100,7 +98,6 @@ namespace Core.MarketAnalyzer //Let the user know that the problem market was ignored. log.DoLogInfo("BinanceFutures - Ignoring bad market data for " + marketName); } - } } BinanceFutures.CheckFirstSeenDates(markets, ref marketInfos, systemConfiguration, log);