calculate method

  1. @override
T calculate(
  1. int index
)
override

Calculates the value of this indicator for the given index without caching it.

Returns the result as a T.

Implementation

@override
T calculate(int index) {
  final double avgRel = _avgRel.getValue(index).quote;
  final double avgDiff = _avgDiff.getValue(index).quote;
  final double smi = avgDiff != 0 ? (avgRel / (avgDiff / 2) * 100) : 0;

  return createResult(index: index, quote: smi);
}