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

Update arrayAvg to account for null values

Open AOjen opened this issue 8 years ago • 0 comments

arrayAvg used to not account for null values when calculating the average of the arrays values. A simple example would be [null, null, 100, 50, null] . arrayAvg used to return 30. Now it returns 75.

Also, will return null if given an empty array or all value of the array are null

AOjen avatar Jun 06 '16 21:06 AOjen