60 public override bool IsReady => CloseBand.IsReady && RangeBand.IsReady;
73 : this($
"RVI({period},{type})", period, type)
87 CloseBand = type.AsIndicator(
"_closingBand", period);
88 RangeBand = type.AsIndicator(
"_rangeBand", period);
100 if (_previousInputs.IsReady)
103 var b = _previousInputs[0].Close - _previousInputs[0].Open;
104 var c = _previousInputs[1].Close - _previousInputs[1].Open;
105 var d = _previousInputs[2].Close - _previousInputs[2].Open;
106 var e = input.
High - input.
Low;
107 var f = _previousInputs[0].High - _previousInputs[0].Low;
108 var g = _previousInputs[1].High - _previousInputs[1].Low;
109 var h = _previousInputs[2].High - _previousInputs[2].Low;
110 CloseBand.Update(input.
Time, (a + 2 * (b + c) + d) / 6);
111 RangeBand.Update(input.
Time, (e + 2 * (f + g) + h) / 6);
113 if (CloseBand.IsReady && RangeBand.IsReady && RangeBand != 0m)
115 _previousInputs.Add(input);
116 var rvi = CloseBand / RangeBand;
122 _previousInputs.Add(input);
134 _previousInputs.Reset();