Fix rebuy shortcuts
This commit is contained in:
parent
e7b4b6ba7d
commit
9bbb5389ab
|
@ -19,15 +19,20 @@ namespace Core.ProfitTrailer
|
||||||
string strategyLetter = "";
|
string strategyLetter = "";
|
||||||
string strategyNameOnly = strategyName;
|
string strategyNameOnly = strategyName;
|
||||||
|
|
||||||
// PT allows for "advanced_stats" to be turned on in the application settings, to show details of the trailing logic.
|
// PT allows for "advanced_stats" to show details of the trailing logic.
|
||||||
if (result.Contains("STATS"))
|
if (result.Contains("STATS"))
|
||||||
{
|
{
|
||||||
result = "";
|
result = "";
|
||||||
}
|
}
|
||||||
// strategy labels that are variable value
|
// strategy labels with variable values
|
||||||
if (result.Contains("REBUY"))
|
if (result.Contains("BUY TIMEOUT AS"))
|
||||||
{
|
{
|
||||||
time = strategyName.Remove(0, 14);
|
time = strategyName.Remove(0, 15);
|
||||||
|
result = "REBUY " + time;
|
||||||
|
}
|
||||||
|
if (result.Contains("BUY TIMEOUT"))
|
||||||
|
{
|
||||||
|
time = strategyName.Remove(0, 12);
|
||||||
result = "REBUY " + time;
|
result = "REBUY " + time;
|
||||||
}
|
}
|
||||||
if (result.Contains("CHANGE PERC"))
|
if (result.Contains("CHANGE PERC"))
|
||||||
|
@ -46,7 +51,6 @@ namespace Core.ProfitTrailer
|
||||||
leverage = leverage.Remove(leverage.Length - 1, 1);
|
leverage = leverage.Remove(leverage.Length - 1, 1);
|
||||||
result = "ISOL " + leverage + "X";
|
result = "ISOL " + leverage + "X";
|
||||||
}
|
}
|
||||||
// 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(":"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue