achannarasappa / ticker

Terminal stock ticker with live updates and position tracking
GNU General Public License v3.0
4.94k stars 264 forks source link

currency-summary-only=true -> holdingSummary.DayChange.Amount is not converted #229

Closed spatnynick closed 2 years ago

spatnynick commented 2 years ago

Hi if you set currency-summary-only to true and a currency to e.g. EUR and add lots in different currencies, the holdingSummary.Value and holdingSummary.Cost is well converted, but not the holdingSummary.DayChange.Amount

imho in asset.go -> func addHoldingToHoldingSummary, this line should be changed from: dayChange := holdingSummary.DayChange.Amount + holding.DayChange.Amount to probably this one, then it looks fine: dayChange := holdingSummary.DayChange.Amount + (holding.DayChange.Amount * currencyRateByUse.SummaryValue)

br Bohuslav

achannarasappa commented 2 years ago

Thanks for finding this bug! I've pushed a fix and you should see that in next release. Let me know if this does not end up fixing the issue for you.