Skip to content

Commit

Permalink
mutual funds price changes from yesterday, shouldn't be part of value…
Browse files Browse the repository at this point in the history
… change
  • Loading branch information
rrelyea committed Jun 21, 2023
1 parent e15a893 commit 441761e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Pages/Portfolio.razor
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,15 @@ Portfolio@(stepPath==null?": review":": "+stepPath.Replace('-',' ')) - bogle.too
if (quoteData?.Close != null) {
foreach (var investment in investments) {
investment.Price = quoteData.Close;
investment.PreviousClose = quoteData.PreviousClose;
investment.PercentChange = quoteData.ChangeP;
if (quoteData.Volume == 0) {
investment.PreviousClose = quoteData.Close;
investment.PercentChange = null;
}
else
{
investment.PreviousClose = quoteData.PreviousClose;
investment.PercentChange = quoteData.ChangeP;
}
if (quoteData.Timestamp != null) {
investment.LastUpdated = UnixTimeStampToDateTime(quoteData.Timestamp);
}
Expand Down

0 comments on commit 441761e

Please sign in to comment.