Browse Source

Reset tracking variables

pull/7610/head
Thomas Kaul 2 weeks ago
parent
commit
3d125ff271
  1. 2
      apps/api/src/app/portfolio/calculator/roai/portfolio-calculator.ts

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

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

Loading…
Cancel
Save