Relative vigor index
The close against the open, scaled by the range, with a signal line.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| period | int | 10 | 1 to 5000 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| rvi | value | Optional | color theme.series_a, style line, width 1 |
| signal | value | Optional | color theme.series_b, dash dash, style line, width 1 |
- Warm-up
- period + 5 bars (15 at the defaults)
- Repaints
- No
- Parity
- MetaTrader 5, within 1e-12
Formula
The body (close - open) and the range (high - low) are each weighted over four bars as 1, 2, 2, 1
RVI = sum of the weighted body / sum of the weighted range over period bars; the body sum alone when the range sum is 0
signal = RVI weighted over four bars as 1, 2, 2, 1, divided by 6