# Relative vigor index

`rvi`

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 | Kind |
| --- | --- |
| rvi | value |
| signal | value |

Warm-up: period + 5 bars (15 at the defaults).

Repaints: No.

## 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
