RVI
The RVI measures the conviction of the recent price movement to confirm trends.
Role in the strategy
| Slot | Available | Role |
|---|---|---|
| Entry Point | No | — |
| Entry Rule | Yes | Filters entries by the RVI direction or its level position. |
| Exit Point | No | — |
| Exit Rule | Yes | Triggers 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:
| Rule | Long signal is 1 when | Short signal is 1 when |
|---|---|---|
| RVI rises | RVI rose on the previous bar | RVI fell on the previous bar |
| RVI falls | RVI fell on the previous bar | RVI rose on the previous bar |
| RVI is higher than the Level line | RVI is above Level | RVI is below −Level |
| RVI is lower than the Level line | RVI is below Level | RVI is above −Level |
| RVI crosses the Level line upward | RVI crossed above Level from below | RVI crossed below −Level from above |
| RVI crosses the Level line downward | RVI crossed below Level from above | RVI crossed above −Level from below |
| RVI changes its direction upward | RVI formed a valley (down then up) | RVI formed a peak (up then down) |
| RVI changes its direction downward | RVI 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
| Parameter | Type | Default | Range | Purpose |
|---|---|---|---|---|
| Period | number | 10 | 1 to 1000 | Bars of the rolling sums |
| Level | number | 0 | −0.5 to 0.5 | Long threshold; the short threshold is −Level |
Calculation
tech.RVI in engine/indicator-engine/tech.ts computes the Relative Vigor Index:
- Weighted numerator:
Close − Openwith weights 1, 2, 2, 1 over the last four bars. - Weighted denominator:
High − Lowwith 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.