technical-indicators
technical-indicators copied to clipboard
Trendline treats null as 0
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.