cleaned up blank lines
This commit is contained in:
parent
6116272e77
commit
54e52c49c8
|
@ -168,12 +168,9 @@ namespace Core.ProfitTrailer
|
||||||
boolean = boolean && nextBoolean;
|
boolean = boolean && nextBoolean;
|
||||||
else
|
else
|
||||||
boolean = boolean || nextBoolean;
|
boolean = boolean || nextBoolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return boolean;
|
return boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception("Empty expression");
|
throw new Exception("Empty expression");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +224,6 @@ namespace Core.ProfitTrailer
|
||||||
{
|
{
|
||||||
result = "";
|
result = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// strategy labels that are variable value
|
// strategy labels that are variable value
|
||||||
if (result.Contains("REBUY"))
|
if (result.Contains("REBUY"))
|
||||||
{
|
{
|
||||||
|
@ -244,7 +240,6 @@ namespace Core.ProfitTrailer
|
||||||
leverage = leverage.Remove(leverage.Length - 1, 1);
|
leverage = leverage.Remove(leverage.Length - 1, 1);
|
||||||
result = leverage + " X";
|
result = leverage + " X";
|
||||||
}
|
}
|
||||||
|
|
||||||
// buy/sell strategies beginning with PT 2.3.3 contain the strategy designation letter followed by a colon and space.
|
// buy/sell strategies beginning with PT 2.3.3 contain the strategy designation letter followed by a colon and space.
|
||||||
// remove the letter and colon, change to shortcut, then reapply the letter and colon
|
// remove the letter and colon, change to shortcut, then reapply the letter and colon
|
||||||
if (strategyName.Contains(":"))
|
if (strategyName.Contains(":"))
|
||||||
|
@ -446,7 +441,6 @@ namespace Core.ProfitTrailer
|
||||||
result = "";
|
result = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -534,14 +528,12 @@ namespace Core.ProfitTrailer
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetStrategyValueDecimals(string strategyName)
|
public static int GetStrategyValueDecimals(string strategyName)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
switch (strategyName.ToLower())
|
switch (strategyName.ToLower())
|
||||||
{
|
{
|
||||||
case "lowbb":
|
case "lowbb":
|
||||||
|
@ -580,7 +572,6 @@ namespace Core.ProfitTrailer
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,14 +606,7 @@ namespace Core.ProfitTrailer
|
||||||
{
|
{
|
||||||
strategyText += "<span class=\"label label-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"CONDITIONAL FORMULA\">(FORM)</span> ";
|
strategyText += "<span class=\"label label-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"CONDITIONAL FORMULA\">(FORM)</span> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// strategyText += "<span class=\"label label-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + strategy.Name + "\">" + StrategyHelper.GetStrategyShortcut(strategy.Name, false) + "</span> ";
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
if (strategy.Name.Contains("LEVEL") && !strategy.Name.Contains("TRIGGERED"))
|
if (strategy.Name.Contains("LEVEL") && !strategy.Name.Contains("TRIGGERED"))
|
||||||
{
|
{
|
||||||
string level = strategy.Name.Substring(5, 2);
|
string level = strategy.Name.Substring(5, 2);
|
||||||
|
@ -639,21 +623,12 @@ namespace Core.ProfitTrailer
|
||||||
{
|
{
|
||||||
strategyText += "<span class=\"label label-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"LEVEL FORMULA\">LEVEL" + level + "</span> ";
|
strategyText += "<span class=\"label label-danger\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"LEVEL FORMULA\">LEVEL" + level + "</span> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// strategyText += "<span class=\"label label-warning\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + strategy.Name + "\">" + StrategyHelper.GetStrategyShortcut(strategy.Name, false) + "</span> ";
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (strategy.Name.Contains("LEVEL") && strategy.Name.Contains("TRIGGERED"))
|
if (strategy.Name.Contains("LEVEL") && strategy.Name.Contains("TRIGGERED"))
|
||||||
{
|
{
|
||||||
string level = strategy.Name.Substring(5, 2);
|
string level = strategy.Name.Substring(5, 2);
|
||||||
strategyText += "<span class=\"label label-success\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"CONDITIONAL FORMULA\">LEVEL " + level + "TRIG</span> ";
|
strategyText += "<span class=\"label label-success\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"CONDITIONAL FORMULA\">LEVEL " + level + "TRIG</span> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -761,14 +736,12 @@ namespace Core.ProfitTrailer
|
||||||
result = simpleValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%";
|
result = simpleValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetTriggerValueText(Summary summary, List<Strategy> strategies, string strategyText, double bbValue, double simpleValue, int buyLevel, bool includeShortcut)
|
public static string GetTriggerValueText(Summary summary, List<Strategy> strategies, string strategyText, double bbValue, double simpleValue, int buyLevel, bool includeShortcut)
|
||||||
{
|
{
|
||||||
string result = "";
|
string result = "";
|
||||||
|
|
||||||
if (strategies.Count > 0)
|
if (strategies.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (Strategy strategy in strategies)
|
foreach (Strategy strategy in strategies)
|
||||||
|
@ -783,12 +756,10 @@ namespace Core.ProfitTrailer
|
||||||
{
|
{
|
||||||
decimalFormat += "0";
|
decimalFormat += "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (includeShortcut)
|
if (includeShortcut)
|
||||||
{
|
{
|
||||||
result += "<span class=\"text-muted\">" + StrategyHelper.GetStrategyShortcut(strategy.Name, true) + "</span> ";
|
result += "<span class=\"text-muted\">" + StrategyHelper.GetStrategyShortcut(strategy.Name, true) + "</span> ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrategyHelper.GetStrategyShortcut(strategy.Name, true).IndexOf("and", StringComparison.InvariantCultureIgnoreCase) > -1)
|
if (StrategyHelper.GetStrategyShortcut(strategy.Name, true).IndexOf("and", StringComparison.InvariantCultureIgnoreCase) > -1)
|
||||||
{
|
{
|
||||||
result += strategy.TriggerValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
result += strategy.TriggerValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
|
||||||
|
@ -832,7 +803,6 @@ namespace Core.ProfitTrailer
|
||||||
result = simpleValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%";
|
result = simpleValue.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")) + "%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue