Lean  $LEAN_TAG$
QuantConnect.Indicators.TrueRange Class Reference

This indicator computes the True Range (TR). The True Range is the greatest of the following values: value1 = distance from today's high to today's low. value2 = distance from yesterday's close to today's high. value3 = distance from yesterday's close to today's low. More...

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

Public Member Functions

 TrueRange ()
 Initializes a new instance of the TrueRange class using the specified name. More...
 
 TrueRange (string name)
 Initializes a new instance of the TrueRange class using the specified name. More...
 

Public Attributes

override bool IsReady => Samples > 1
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
int WarmUpPeriod => 2
 Required period, in data points, for the indicator to be 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...
 

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 True Range (TR). The True Range is the greatest of the following values: value1 = distance from today's high to today's low. value2 = distance from yesterday's close to today's high. value3 = distance from yesterday's close to today's low.

Definition at line 28 of file TrueRange.cs.

Constructor & Destructor Documentation

◆ TrueRange() [1/2]

QuantConnect.Indicators.TrueRange.TrueRange ( )

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

Definition at line 35 of file TrueRange.cs.

◆ TrueRange() [2/2]

QuantConnect.Indicators.TrueRange.TrueRange ( string  name)

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

Parameters
nameThe name of this indicator

Definition at line 44 of file TrueRange.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.TrueRange.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 64 of file TrueRange.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.TrueRange.IsReady => Samples > 1

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

Definition at line 52 of file TrueRange.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.TrueRange.WarmUpPeriod => 2

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

Definition at line 57 of file TrueRange.cs.


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