Merge pull request #116 from HojouFotytu/develop

Strategy Icons
This commit is contained in:
HojouFotytu 2019-04-12 13:01:26 +09:00 committed by GitHub
commit 1712b2c923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 7 deletions

View File

@ -20,6 +20,22 @@ namespace Core.ProfitTrailer
public static string GetStrategyShortcut(string strategyName, bool onlyValidStrategies)
{
string result = strategyName;
string time = "";
// strategy labels that are variable, so can't be caught by the switch statement
if (result.Contains("FORMULA"))
{
result = "FORM";
}
if (result.Contains("REBUY"))
{
time = strategyName.Remove(0,14);
result = "REBUY " + time;
}
if (result.Contains("CHANGE PERC"))
{
result = "CHANGE";
}
switch (strategyName.ToLower())
{
@ -140,14 +156,8 @@ namespace Core.ProfitTrailer
case "max cost reached":
result = "COST";
break;
case "rebuy timeout":
result = "TIMEOUT";
break;
case "min/max change perc":
result = "MIN/MAX";
break;
case "buy value below dust":
result = "MIN DUST";
result = "DUST";
break;
default:
break;