40 private readonly
Sum _flowRatioSum;
42 private readonly
Sum _volumeSum;
47 public override bool IsReady => _flowRatioSum.IsReady;
60 _flowRatioSum.Reset();
70 : base($
"CMF({name})")
73 _flowRatioSum =
new Sum(period);
74 _volumeSum =
new Sum(period);
84 var denominator = (input.
High - input.
Low);
85 var flowRatio = denominator > 0
89 _flowRatioSum.Update(input.
EndTime, flowRatio);
92 return !
IsReady || _volumeSum == 0m ? 0m : _flowRatioSum / _volumeSum;