technical-indicators icon indicating copy to clipboard operation
technical-indicators copied to clipboard

Trendline treats null as 0

Open AOjen opened this issue 8 years ago • 0 comments

At least for the SMA, but probably others. When there are datapoints with a null Y value, I believe the trend line treats them as if they are 0s.

It seems like these datapoints should be ignored entirely. For example, if I was doing a 7 day moving average and day 20 of 100 was missing data, the SMA value could just use the last 6 days for the day 20 SMA value. i.e. Do the sum, but divide by 6 instead of 7.

AOjen avatar May 31 '16 21:05 AOjen