48 public override bool IsReady => _smoother.IsReady;
66 _smoother = movingAverageType.AsIndicator($
"{name}_{movingAverageType}", period);
72 _previous = currentBar;
75 , trueRangeIndicator => trueRangeIndicator.Samples >= 1
85 : this($
"ATR({period})", period, movingAverageType)
102 var range1 = current.
High - current.
Low;
103 if (previous ==
null)
108 var range2 = Math.Abs(current.
High - previous.
Close);
109 var range3 = Math.Abs(current.
Low - previous.
Close);
111 return Math.Max(range1, Math.Max(range2, range3));
125 return _smoother.Current.Value;