Browse Source

Refactoring

pull/6298/head
Thomas Kaul 2 months ago
parent
commit
ad7503be05
  1. 4
      apps/api/src/app/portfolio/calculator/roai/portfolio-calculator.ts

4
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator.ts

@ -626,11 +626,11 @@ export class RoaiPortfolioCalculator extends PortfolioCalculator {
totalQuantityFromBuyTransactions
);
// Reset tracking variables when position is fully closed
if (totalUnits.eq(0)) {
totalQuantityFromBuyTransactions = new Big(0);
// Reset tracking variables when position is fully closed
totalInvestmentFromBuyTransactions = new Big(0);
totalInvestmentFromBuyTransactionsWithCurrencyEffect = new Big(0);
totalQuantityFromBuyTransactions = new Big(0);
}
if (PortfolioCalculator.ENABLE_LOGGING) {

Loading…
Cancel
Save