Lean  $LEAN_TAG$
QuantConnect.Indicators.RelativeVigorIndex Class Reference

The Relative Vigor Index (RVI) compares the ratio of the closing price of a security to its trading range. For illustration, let: More...

Inheritance diagram for QuantConnect.Indicators.RelativeVigorIndex:
[legend]

Public Member Functions

 RelativeVigorIndex (int period, MovingAverageType type)
 Initializes a new instance of the RelativeVigorIndex (RVI) class. More...
 
 RelativeVigorIndex (string name, int period, MovingAverageType type=MovingAverageType.Simple)
 Initializes a new instance of the RelativeVigorIndex (RVI) class. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => CloseBand.IsReady && RangeBand.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (IBaseDataBar input)
 Computes the next value of this indicator from the given state More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.BarIndicator
 BarIndicator (string name)
 Creates a new TradeBarIndicator with the specified name More...
 

Properties

RelativeVigorIndexSignal Signal [get]
 A signal line which behaves like a slowed version of the RVI. More...
 
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

The Relative Vigor Index (RVI) compares the ratio of the closing price of a security to its trading range. For illustration, let:

a = Close−Open

b = Close−Open of One Bar Prior to a

c = Close−Open of One Bar Prior to b

d = Close−Open of One Bar Prior to c

e = High−Low of Bar a

f = High−Low of Bar b

g = High−Low of Bar c

h = High−Low of Bar d

Then let (a+2*(b+c)+d)/6 be NUM and (e+2*(f+g)+h)/6 be DENOM.

RVI = SMA(NUM)/SMA(DENOM)

for a specified period.

https://www.investopedia.com/terms/r/relative_vigor_index.asp

Definition at line 38 of file RelativeVigorIndex.cs.

Constructor & Destructor Documentation

◆ RelativeVigorIndex() [1/2]

QuantConnect.Indicators.RelativeVigorIndex.RelativeVigorIndex ( int  period,
MovingAverageType  type 
)

Initializes a new instance of the RelativeVigorIndex (RVI) class.

Parameters
periodThe period for the RelativeVigorIndex.
typeThe type of Moving Average to use

Definition at line 72 of file RelativeVigorIndex.cs.

◆ RelativeVigorIndex() [2/2]

QuantConnect.Indicators.RelativeVigorIndex.RelativeVigorIndex ( string  name,
int  period,
MovingAverageType  type = MovingAverageType.Simple 
)

Initializes a new instance of the RelativeVigorIndex (RVI) class.

Parameters
nameThe name of this indicator.
periodThe period for the RelativeVigorIndex.
typeThe type of Moving Average to use

Definition at line 83 of file RelativeVigorIndex.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.RelativeVigorIndex.ComputeNextValue ( IBaseDataBar  input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator
Returns
A new value for this indicator

Definition at line 98 of file RelativeVigorIndex.cs.

◆ Reset()

override void QuantConnect.Indicators.RelativeVigorIndex.Reset ( )

Resets this indicator to its initial state

Definition at line 129 of file RelativeVigorIndex.cs.

Here is the call graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.RelativeVigorIndex.IsReady => CloseBand.IsReady && RangeBand.IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 60 of file RelativeVigorIndex.cs.

Property Documentation

◆ Signal

RelativeVigorIndexSignal QuantConnect.Indicators.RelativeVigorIndex.Signal
get

A signal line which behaves like a slowed version of the RVI.

Definition at line 55 of file RelativeVigorIndex.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.RelativeVigorIndex.WarmUpPeriod
get

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 65 of file RelativeVigorIndex.cs.


The documentation for this class was generated from the following file: