Fix incorrect buy strat for non-dca coins
This commit is contained in:
parent
ebba624bd8
commit
1496aac262
|
@ -271,13 +271,18 @@ namespace Core.ProfitTrailer
|
|||
}
|
||||
|
||||
public static string GetStrategyText(Summary summary, List<Strategy> 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 += "<span class=\"label label-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + strategy.Name + "\">" + StrategyHelper.GetStrategyShortcut(strategy.Name, false) + "</span> ";
|
||||
}
|
||||
|
@ -305,14 +310,17 @@ namespace Core.ProfitTrailer
|
|||
}
|
||||
else
|
||||
{
|
||||
if (StrategyHelper.IsValidStrategy(strategyText))
|
||||
|
||||
isValidStrategy = StrategyHelper.IsValidStrategy(strategyText);
|
||||
|
||||
if (isValidStrategy)
|
||||
{
|
||||
strategyText = "<span class=\"label label-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + strategyText + "\">" + StrategyHelper.GetStrategyShortcut(strategyText, true) + "</span>";
|
||||
}
|
||||
else if (strategyText.Equals(""))
|
||||
|
||||
else if (strategyText.Equals("") && isValidStrategy == false)
|
||||
{
|
||||
strategyText = summary.DCABuyStrategy;
|
||||
strategyText = "<span class=\"label label-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + strategyText + "\">" + StrategyHelper.GetStrategyShortcut(strategyText, true) + "</span>";
|
||||
strategyText = "<span class=\"label label-muted\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Not Applicable: Not using DCA!\"></span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue