36 private readonly
int _denominator;
50 _denominator = (period * (period + 1)) / 2;
58 : this($
"LWMA({period})", period)
77 var index = window.
Size;
82 var minSizeSamples = (int)Math.Min(index, window.
Samples);
83 for (var i = 0; i < minSizeSamples; i++)
85 numerator += (index-- * window[i].Value);
87 return numerator / _denominator;