Lean  $LEAN_TAG$
QuantConnect.Indicators.OnBalanceVolume Class Reference

This indicator computes the On Balance Volume (OBV). The On Balance Volume is calculated by determining the price of the current close price and previous close price. If the current close price is equivalent to the previous price the OBV remains the same, If the current close price is higher the volume of that day is added to the OBV, while a lower close price will result in negative value. More...

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

Public Member Functions

 OnBalanceVolume ()
 Initializes a new instance of the Indicator class using the specified name. More...
 
 OnBalanceVolume (string name)
 Initializes a new instance of the Indicator class using the specified name. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => _previousInput != null
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
int WarmUpPeriod => 1
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Protected Member Functions

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

Additional Inherited Members

- 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

This indicator computes the On Balance Volume (OBV). The On Balance Volume is calculated by determining the price of the current close price and previous close price. If the current close price is equivalent to the previous price the OBV remains the same, If the current close price is higher the volume of that day is added to the OBV, while a lower close price will result in negative value.

Definition at line 27 of file OnBalanceVolume.cs.

Constructor & Destructor Documentation

◆ OnBalanceVolume() [1/2]

QuantConnect.Indicators.OnBalanceVolume.OnBalanceVolume ( )

Initializes a new instance of the Indicator class using the specified name.


Definition at line 34 of file OnBalanceVolume.cs.

◆ OnBalanceVolume() [2/2]

QuantConnect.Indicators.OnBalanceVolume.OnBalanceVolume ( string  name)

Initializes a new instance of the Indicator class using the specified name.

Parameters
nameThe name of this indicator

Definition at line 43 of file OnBalanceVolume.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.OnBalanceVolume.ComputeNextValue ( TradeBar  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 63 of file OnBalanceVolume.cs.

◆ Reset()

override void QuantConnect.Indicators.OnBalanceVolume.Reset ( )

Resets this indicator to its initial state

Definition at line 93 of file OnBalanceVolume.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.OnBalanceVolume.IsReady => _previousInput != null

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

Definition at line 51 of file OnBalanceVolume.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.OnBalanceVolume.WarmUpPeriod => 1

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

Definition at line 56 of file OnBalanceVolume.cs.


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