leveraged profits fix
This commit is contained in:
parent
24a1c97cdc
commit
fb5d05f93c
|
@ -160,11 +160,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Aggregate totals
|
||||
double bagGain = (profitPercentage / 100) * dcaLogEntry.TotalCost * leverageValue;
|
||||
Model.TotalBagCost = Model.TotalBagCost + dcaLogEntry.TotalCost;
|
||||
Model.TotalBagGain = Model.TotalBagGain + bagGain;
|
||||
|
||||
// Render the row
|
||||
<tr @(lostValue ? "class=errorRow" : "") >
|
||||
<!-- Market -->
|
||||
|
@ -226,20 +221,25 @@
|
|||
{
|
||||
<td class="text-left"></td>
|
||||
}
|
||||
|
||||
<!-- Profit -->
|
||||
@if (!@lostValue)
|
||||
{
|
||||
profitPercentage = profitPercentage * leverageValue;
|
||||
<td class="text-autocolor">@profitPercentage.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))%</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td class="text-left">No Value!</td>
|
||||
}
|
||||
|
||||
<!-- Bag details -->
|
||||
<td class="text-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)_get/BagDetails/?m=@dcaLogEntry.Market" data-remote="false" data-toggle="modal" data-target="#dca-chart"><i class="fa fa-plus-circle"></i></a></td>
|
||||
</tr>
|
||||
{
|
||||
// Aggregate totals
|
||||
double bagGain = (profitPercentage / 100) * dcaLogEntry.TotalCost;
|
||||
Model.TotalBagCost = Model.TotalBagCost + dcaLogEntry.TotalCost;
|
||||
Model.TotalBagGain = Model.TotalBagGain + bagGain;
|
||||
}
|
||||
}
|
||||
<td>Totals:</td>
|
||||
<td></td>
|
||||
|
|
Loading…
Reference in New Issue