Merge branch 'develop' of https://github.com/HojouFotytu/PTMagic into develop
This commit is contained in:
commit
fbebf93d8c
|
@ -433,7 +433,6 @@ namespace Core.ProfitTrailer
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (onlyValidStrategies)
|
||||
{
|
||||
if (strategyName.IndexOf("SOM") > -1 || strategyName.IndexOf("MAX") > -1 || strategyName.IndexOf("MIN") > -1 || strategyName.IndexOf("PRICE") > -1 || strategyName.IndexOf("BLACK") > -1 || strategyName.IndexOf("INSUFFICIENT") > -1 || strategyName.IndexOf("COST") > -1)
|
||||
|
@ -452,13 +451,11 @@ namespace Core.ProfitTrailer
|
|||
public static bool IsValidStrategy(string strategyName, bool checkForAnyInvalid)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
// buy/sell strategies beginning with PT 2.3.3 contain the letter followed by a colon and space.
|
||||
if (strategyName.Contains(":"))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
||||
// Prior to PT 2.3.3
|
||||
if (!checkForAnyInvalid)
|
||||
{
|
||||
|
@ -530,7 +527,6 @@ namespace Core.ProfitTrailer
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int GetStrategyValueDecimals(string strategyName)
|
||||
{
|
||||
int result = 0;
|
||||
|
@ -574,7 +570,6 @@ namespace Core.ProfitTrailer
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string GetStrategyText(Summary summary, List<Strategy> strategies, string strategyText, bool isTrue, bool isTrailingBuyActive)
|
||||
{
|
||||
bool isValidStrategy = false;
|
||||
|
@ -585,9 +580,7 @@ namespace Core.ProfitTrailer
|
|||
foreach (Strategy strategy in strategies)
|
||||
{
|
||||
string textClass = (strategy.IsTrue) ? "label-success" : "label-danger";
|
||||
|
||||
isValidStrategy = StrategyHelper.IsValidStrategy(strategy.Name);
|
||||
|
||||
if (!isValidStrategy)
|
||||
{
|
||||
// Parse Formulas
|
||||
|
@ -635,7 +628,6 @@ namespace Core.ProfitTrailer
|
|||
strategyText += "<span class=\"label " + textClass + "\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + strategy.Name + "\">" + StrategyHelper.GetStrategyShortcut(strategy.Name, false) + "</span> ";
|
||||
}
|
||||
}
|
||||
|
||||
if (isTrailingBuyActive)
|
||||
{
|
||||
strategyText += " <i class=\"fa fa-flag text-success\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Trailing active!\"></i>";
|
||||
|
@ -654,14 +646,11 @@ namespace Core.ProfitTrailer
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
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("") && isValidStrategy == false)
|
||||
{
|
||||
strategyText = "<span class=\"label label-muted\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Not Applicable: Not using DCA!\"></span>";
|
||||
|
@ -672,10 +661,8 @@ namespace Core.ProfitTrailer
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return strategyText;
|
||||
}
|
||||
|
||||
public static string GetCurrentValueText(List<Strategy> strategies, string strategyText, double bbValue, double simpleValue, bool includeShortcut)
|
||||
{
|
||||
string result = "";
|
||||
|
|
Loading…
Reference in New Issue