achannarasappa / ticker

Terminal stock ticker with live updates and position tracking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

currency-summary-only=true -> dayChange in summary is not converted

spatnynick opened this issue · comments

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

Duplicate of #229