RVI

The RVI measures the conviction of the recent price movement to confirm trends.

Role in the strategy

SlotAvailableRole
Entry PointNo—
Entry RuleYesFilters entries by the RVI direction or its level position.
Exit PointNo—
Exit RuleYesTriggers exits by the RVI direction or its level position.

The RVI produces conditions, not order prices. As an entry rule it is ANDed with the entry point and the other entry rules; as an exit rule it is ORed with the other exit rules. See Indicators for the slot semantics.

Logic rules

The indicator offers the standard oscillator rule set, evaluated on the RVI value:

RuleLong signal is 1 whenShort signal is 1 when
RVI risesRVI rose on the previous barRVI fell on the previous bar
RVI fallsRVI fell on the previous barRVI rose on the previous bar
RVI is higher than the Level lineRVI is above LevelRVI is below −Level
RVI is lower than the Level lineRVI is below LevelRVI is above −Level
RVI crosses the Level line upwardRVI crossed above Level from belowRVI crossed below −Level from above
RVI crosses the Level line downwardRVI crossed below Level from aboveRVI crossed above −Level from below
RVI changes its direction upwardRVI formed a valley (down then up)RVI formed a peak (up then down)
RVI changes its direction downwardRVI formed a peak (up then down)RVI formed a valley (down then up)

The Level parameter sets the long threshold; the short threshold is always −Level.

Parameters

ParameterTypeDefaultRangePurpose
Periodnumber101 to 1000Bars of the rolling sums
Levelnumber0−0.5 to 0.5Long threshold; the short threshold is −Level

Calculation

tech.RVI in engine/indicator-engine/tech.ts computes the Relative Vigor Index:

  • Weighted numerator: Close − Open with weights 1, 2, 2, 1 over the last four bars.
  • Weighted denominator: High − Low with the same weights.
  • RVI = rolling sum of the numerator over the Period divided by the rolling sum of the denominator.

The RVI line (green) and its Signal line (red) are drawn in a separate chart pane; the rules use the RVI line. The value is confined to roughly −0.5 to +0.5.

Backtesting

  • The rule is evaluated on the previous (closed) bar with the standard dead zone (SIGMA = 0.000001).
  • The indicator contributes only long/short signal arrays — it never changes the entry or exit order price.
  • An entry happens only when the entry point allows the direction and every entry rule passes; an exit happens when the exit point is reached and any exit rule passes.