Lean  $LEAN_TAG$
QuantConnect.Indicators.AverageTrueRange Class Reference

The AverageTrueRange indicator is a measure of volatility introduced by Welles Wilder in his book: New Concepts in Technical Trading Systems. This indicator computes the TrueRange and then smoothes the TrueRange over a given period. More...

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

Public Member Functions

 AverageTrueRange (string name, int period, MovingAverageType movingAverageType=MovingAverageType.Wilders)
 Creates a new AverageTrueRange indicator using the specified period and moving average type More...
 
 AverageTrueRange (int period, MovingAverageType movingAverageType=MovingAverageType.Wilders)
 Creates a new AverageTrueRange indicator using the specified period and moving average type More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Static Public Member Functions

static decimal ComputeTrueRange (IBaseDataBar previous, IBaseDataBar current)
 Computes the TrueRange from the current and previous trade bars More...
 

Public Attributes

override bool IsReady => _smoother.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

IndicatorBase< IBaseDataBarTrueRange [get]
 Gets the true range which is the more volatile calculation to be smoothed by this indicator 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 AverageTrueRange indicator is a measure of volatility introduced by Welles Wilder in his book: New Concepts in Technical Trading Systems. This indicator computes the TrueRange and then smoothes the TrueRange over a given period.

TrueRange is defined as the maximum of the following: High - Low ABS(High - PreviousClose) ABS(Low - PreviousClose)

Definition at line 31 of file AverageTrueRange.cs.

Constructor & Destructor Documentation

◆ AverageTrueRange() [1/2]

QuantConnect.Indicators.AverageTrueRange.AverageTrueRange ( string  name,
int  period,
MovingAverageType  movingAverageType = MovingAverageType.Wilders 
)

Creates a new AverageTrueRange indicator using the specified period and moving average type

Parameters
nameThe name of this indicator
periodThe smoothing period used to smooth the true range values
movingAverageTypeThe type of smoothing used to smooth the true range values

Definition at line 61 of file AverageTrueRange.cs.

Here is the call graph for this function:

◆ AverageTrueRange() [2/2]

QuantConnect.Indicators.AverageTrueRange.AverageTrueRange ( int  period,
MovingAverageType  movingAverageType = MovingAverageType.Wilders 
)

Creates a new AverageTrueRange indicator using the specified period and moving average type

Parameters
periodThe smoothing period used to smooth the true range values
movingAverageTypeThe type of smoothing used to smooth the true range values

Definition at line 84 of file AverageTrueRange.cs.

Member Function Documentation

◆ ComputeTrueRange()

static decimal QuantConnect.Indicators.AverageTrueRange.ComputeTrueRange ( IBaseDataBar  previous,
IBaseDataBar  current 
)
static

Computes the TrueRange from the current and previous trade bars

TrueRange is defined as the maximum of the following: High - Low ABS(High - PreviousClose) ABS(Low - PreviousClose)

Parameters
previousThe previous trade bar
currentThe current trade bar
Returns
The true range

Definition at line 100 of file AverageTrueRange.cs.

Here is the caller graph for this function:

◆ ComputeNextValue()

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

◆ Reset()

override void QuantConnect.Indicators.AverageTrueRange.Reset ( )

Resets this indicator to its initial state

Definition at line 131 of file AverageTrueRange.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.AverageTrueRange.IsReady => _smoother.IsReady

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

Definition at line 48 of file AverageTrueRange.cs.

Property Documentation

◆ TrueRange

IndicatorBase<IBaseDataBar> QuantConnect.Indicators.AverageTrueRange.TrueRange
get

Gets the true range which is the more volatile calculation to be smoothed by this indicator

Definition at line 43 of file AverageTrueRange.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.AverageTrueRange.WarmUpPeriod
get

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

Definition at line 53 of file AverageTrueRange.cs.


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