29 private readonly
int _period;
69 : this($
"CHOP({period})", period)
81 _trueRange.Update(input);
84 _highs.Add(input.
High);
88 if (_trueRange.IsReady)
90 _trueRangeHistory.Add(_trueRange.Current.Value);
94 _trueRangeHistory.Add(input.
High - input.
Low);
100 var maxHigh = _highs.Max();
101 var minLow = _lows.Min();
103 if (maxHigh != minLow)
106 return (decimal)(100.0 * Math.Log10(((
double) _trueRangeHistory.Sum()) / ((
double) (maxHigh - minLow))) / Math.Log10(_period));
129 _trueRangeHistory.Reset();