Skip to content

Commit

Permalink
fix: used propert value for day change
Browse files Browse the repository at this point in the history
  • Loading branch information
achannarasappa committed Feb 15, 2021
1 parent 95aa78f commit 9978c4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
options cli.Options
err error
rootCmd = &cobra.Command{
Version: "v3.1.2",
Version: "v3.1.3",
Use: "ticker",
Short: "Terminal stock ticker and stock gain/loss tracker",
Args: cli.Validate(&ctx, &options, &err),
Expand Down
2 changes: 1 addition & 1 deletion internal/position/position.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func GetPositions(ctx c.Context, aggregatedLots map[string]AggregatedLot) func([
Value: positionsReduced.positionSummaryBase.value,
Cost: positionsReduced.positionSummaryBase.cost,
Change: positionsReduced.positionSummaryBase.value - positionsReduced.positionSummaryBase.cost,
DayChange: positionsReduced.positionSummaryBase.cost,
DayChange: positionsReduced.positionSummaryBase.dayChange,
ChangePercent: (positionsReduced.positionSummaryBase.value / positionsReduced.positionSummaryBase.cost) * 100,
DayChangePercent: (positionsReduced.positionSummaryBase.dayChange / positionsReduced.positionSummaryBase.value) * 100,
}
Expand Down

0 comments on commit 9978c4f

Please sign in to comment.