Relative Vigor Index

How strongly candles close above their open compared with their full range.

Relative Vigor Index: num = SWMA(close − open), den = SWMA(high − low), SWMA = the 4-candle symmetric average (1, 2, 2, 1) ÷ 6; RVI = sum(num) ÷ sum(den) over the last length values; signal = SWMA(RVI). Ready at length + 3 (signal + 6) candles; not ready when every range is 0. Mirror: signed (a mirrored candle flips close − open, its range stays).

Settings

SettingDefaultRangeWhat it does
length101 to 500SWMA values in the sums.

What it gives

OutputWhat it is
RVIRVI, −1–1.
Signal lineSWMA of RVI, −1–1.

What it reads

It reads the whole candle (open, high, low, close and volume).

Warm-up

With its default settings, Relative Vigor Index needs 16 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.

Test it

Copy this sentence into the Algonney chat to backtest it:

Backtest a strategy on BTC that uses Relative Vigor Index with its default settings