rvi
forge.tafunctionSince Forge API 1
Functionpython
forge.ta.rvi(open: ArrayLike,high: ArrayLike,low: ArrayLike,close: ArrayLike,period: int = 10) -> dict[str, np.ndarray]Relative vigor index: the close against the open, scaled by the range, with a signal line.
Parameters
| Name | Type | Default |
|---|---|---|
| open | ArrayLike | |
| high | ArrayLike | |
| low | ArrayLike | |
| close | ArrayLike | |
| period | int | 10 |
Indicator: Relative vigor index
The body (close - open) and the range (high - low) are each weighted over four bars as 1, 2, 2,
1, then summed over period bars. rvi is their ratio, or the body sum alone where the
range sum is 0. signal is rvi weighted the same way over four bars, divided by 6.
Classpython
forge.ta.RVI(**inputs: Any) -> NoneThe close against the open, scaled by the range, with a signal line.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| period | int | 10 | 1 to 5000 |
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