diff --git a/Core/ProfitTrailer/StrategyHelper.cs b/Core/ProfitTrailer/StrategyHelper.cs index cee6e96..f83cca5 100644 --- a/Core/ProfitTrailer/StrategyHelper.cs +++ b/Core/ProfitTrailer/StrategyHelper.cs @@ -271,13 +271,18 @@ namespace Core.ProfitTrailer } public static string GetStrategyText(Summary summary, List strategies, string strategyText, bool isTrue, bool isTrailingBuyActive) - { + { + bool isValidStrategy = false; + if (strategies.Count > 0) { foreach (Strategy strategy in strategies) { string textClass = (strategy.IsTrue) ? "label-success" : "label-danger"; - if (!StrategyHelper.IsValidStrategy(strategy.Name)) + + isValidStrategy = StrategyHelper.IsValidStrategy(strategy.Name); + + if (!isValidStrategy) { strategyText += "" + StrategyHelper.GetStrategyShortcut(strategy.Name, false) + " "; } @@ -305,14 +310,17 @@ namespace Core.ProfitTrailer } else { - if (StrategyHelper.IsValidStrategy(strategyText)) + + isValidStrategy = StrategyHelper.IsValidStrategy(strategyText); + + if (isValidStrategy) { strategyText = "" + StrategyHelper.GetStrategyShortcut(strategyText, true) + ""; } - else if (strategyText.Equals("")) + + else if (strategyText.Equals("") && isValidStrategy == false) { - strategyText = summary.DCABuyStrategy; - strategyText = "" + StrategyHelper.GetStrategyShortcut(strategyText, true) + ""; + strategyText = ""; } else {