Skip to content

Fix SMA formula #4

Description

@wuhkuh

When calculating the SMA of index 6 with period 5, it includes index 1, as the sum is inclusive.
However, it should only calculate with indexes 2, 3, 4, 5 and 6.

Solution:
Formula underneath the sum should be k = i - p + 1

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions