update code for isolated leverage
This commit is contained in:
parent
fe32db20c5
commit
4fc5fa6e51
|
@ -147,25 +147,20 @@
|
||||||
buyDisabled = true;
|
buyDisabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if leverage, recalculate profit target
|
||||||
|
|
||||||
if (buyStrategyText.Contains("CROSSED"))
|
if (buyStrategyText.Contains("CROSSED"))
|
||||||
{
|
{
|
||||||
string leverageText = buyStrategyText.Remove(0, buyStrategyText.IndexOf("CROSSED")+9);
|
string leverageText = buyStrategyText.Remove(0, buyStrategyText.IndexOf("CROSSED")+9);
|
||||||
leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)"));
|
leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)"));
|
||||||
leverageValue = double.Parse(leverage);
|
leverageValue = double.Parse(leverage);
|
||||||
Write(leverageValue);
|
|
||||||
}
|
}
|
||||||
if (buyStrategyText.Contains("ISOLATED"))
|
if (buyStrategyText.Contains("ISOLATED"))
|
||||||
{
|
{
|
||||||
leverage = buyStrategyText.Remove(0, 10);
|
string leverageText = buyStrategyText.Remove(0, buyStrategyText.IndexOf("ISOLATED")+10);
|
||||||
leverage = leverage.Remove(leverage.Length - 3, 3);
|
leverage = leverageText.Remove(leverageText.IndexOf(".0)"), leverageText.Length - leverageText.IndexOf(".0)"));
|
||||||
//leverageValue = double.Parse(leverage);
|
leverageValue = double.Parse(leverage);
|
||||||
Write(leverage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string sellStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, isSellStrategyTrue, isTrailingSellActive);
|
string sellStrategyText = Core.ProfitTrailer.StrategyHelper.GetStrategyText(Model.Summary, dcaLogEntry.SellStrategies, dcaLogEntry.SellStrategy, isSellStrategyTrue, isTrailingSellActive);
|
||||||
|
|
||||||
// Check for when PT loses the value of a pair
|
// Check for when PT loses the value of a pair
|
||||||
|
|
Loading…
Reference in New Issue