Lean  $LEAN_TAG$
QuantConnect.Indicators.KeltnerChannels Class Reference

This indicator creates a moving average (middle band) with an upper band and lower band fixed at k average true range multiples away from the middle band.
More...

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

Public Member Functions

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

Public Attributes

override bool IsReady => MiddleBand.IsReady && UpperBand.IsReady && LowerBand.IsReady && AverageTrueRange.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 for 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< IndicatorDataPointMiddleBand [get]
 Gets the middle band of the channel More...
 
IndicatorBase< IBaseDataBarUpperBand [get]
 Gets the upper band of the channel More...
 
IndicatorBase< IBaseDataBarLowerBand [get]
 Gets the lower band of the channel More...
 
IndicatorBase< IBaseDataBarAverageTrueRange [get]
 Gets the average true range 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

This indicator creates a moving average (middle band) with an upper band and lower band fixed at k average true range multiples away from the middle band.

Definition at line 24 of file KeltnerChannels.cs.

Constructor & Destructor Documentation

◆ KeltnerChannels() [1/2]

QuantConnect.Indicators.KeltnerChannels.KeltnerChannels ( int  period,
decimal  k,
MovingAverageType  movingAverageType = MovingAverageType.Simple 
)

Initializes a new instance of the KeltnerChannels class

Parameters
periodThe period of the average true range and moving average (middle band)
kThe number of multiplies specifying the distance between the middle band and upper or lower bands
movingAverageTypeThe type of moving average to be used

Definition at line 53 of file KeltnerChannels.cs.

◆ KeltnerChannels() [2/2]

QuantConnect.Indicators.KeltnerChannels.KeltnerChannels ( string  name,
int  period,
decimal  k,
MovingAverageType  movingAverageType = MovingAverageType.Simple 
)

Initializes a new instance of the KeltnerChannels class

Parameters
nameThe name of this indicator
periodThe period of the average true range and moving average (middle band)
kThe number of multiples specifying the distance between the middle band and upper or lower bands
movingAverageTypeThe type of moving average to be used

Definition at line 65 of file KeltnerChannels.cs.

Member Function Documentation

◆ Reset()

override void QuantConnect.Indicators.KeltnerChannels.Reset ( )

Resets this indicator to its initial state

Definition at line 102 of file KeltnerChannels.cs.

Here is the call graph for this function:

◆ ComputeNextValue()

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

Computes the next value for this indicator from the given state.

Parameters
inputThe TradeBar to this indicator on this time step
Returns
A new value for this indicator

Definition at line 116 of file KeltnerChannels.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.KeltnerChannels.IsReady => MiddleBand.IsReady && UpperBand.IsReady && LowerBand.IsReady && AverageTrueRange.IsReady

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

Definition at line 92 of file KeltnerChannels.cs.

Property Documentation

◆ MiddleBand

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.KeltnerChannels.MiddleBand
get

Gets the middle band of the channel

Definition at line 29 of file KeltnerChannels.cs.

◆ UpperBand

IndicatorBase<IBaseDataBar> QuantConnect.Indicators.KeltnerChannels.UpperBand
get

Gets the upper band of the channel

Definition at line 34 of file KeltnerChannels.cs.

◆ LowerBand

IndicatorBase<IBaseDataBar> QuantConnect.Indicators.KeltnerChannels.LowerBand
get

Gets the lower band of the channel

Definition at line 39 of file KeltnerChannels.cs.

◆ AverageTrueRange

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

Gets the average true range

Definition at line 44 of file KeltnerChannels.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.KeltnerChannels.WarmUpPeriod
get

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

Definition at line 97 of file KeltnerChannels.cs.


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