Leverage calculations issues fixed for distibution chart
This commit is contained in:
parent
4fdd0ed112
commit
d7f61da1b6
|
@ -196,15 +196,15 @@ namespace Monitor.Pages
|
||||||
{
|
{
|
||||||
if (sellStrategyText.Contains("PENDING"))
|
if (sellStrategyText.Contains("PENDING"))
|
||||||
{
|
{
|
||||||
PendingBalance = PendingBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
PendingBalance = PendingBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
|
||||||
}
|
}
|
||||||
else if (dcaLogEntry.BuyStrategies.Count > 0)
|
else if (dcaLogEntry.BuyStrategies.Count > 0)
|
||||||
{
|
{
|
||||||
DCABalance = DCABalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
DCABalance = DCABalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PairsBalance = PairsBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage);
|
PairsBalance = PairsBalance + ((dcaLogEntry.Amount * dcaLogEntry.CurrentPrice) / dcaLogEntry.Leverage != 0 ? dcaLogEntry.Leverage : 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue