Lean  $LEAN_TAG$
QuantConnect.Indicators.DonchianChannel Class Reference

This indicator computes the upper and lower band of the Donchian Channel. The upper band is computed by finding the highest high over the given period. The lower band is computed by finding the lowest low over the given period. The primary output value of the indicator is the mean of the upper and lower band for the given timeframe. More...

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

Public Member Functions

 DonchianChannel (int period)
 Initializes a new instance of the DonchianChannel class. More...
 
 DonchianChannel (int upperPeriod, int lowerPeriod)
 Initializes a new instance of the DonchianChannel class. More...
 
 DonchianChannel (string name, int period)
 Initializes a new instance of the DonchianChannel class. More...
 
 DonchianChannel (string name, int upperPeriod, int lowerPeriod)
 Initializes a new instance of the DonchianChannel class. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => UpperBand.IsReady && LowerBand.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< IndicatorDataPointUpperBand [get]
 Gets the upper band of the Donchian Channel. More...
 
IndicatorBase< IndicatorDataPointLowerBand [get]
 Gets the lower band of the Donchian Channel. 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 computes the upper and lower band of the Donchian Channel. The upper band is computed by finding the highest high over the given period. The lower band is computed by finding the lowest low over the given period. The primary output value of the indicator is the mean of the upper and lower band for the given timeframe.

Definition at line 28 of file DonchianChannel.cs.

Constructor & Destructor Documentation

◆ DonchianChannel() [1/4]

QuantConnect.Indicators.DonchianChannel.DonchianChannel ( int  period)

Initializes a new instance of the DonchianChannel class.

Parameters
periodThe period for both the upper and lower channels.

Definition at line 44 of file DonchianChannel.cs.

◆ DonchianChannel() [2/4]

QuantConnect.Indicators.DonchianChannel.DonchianChannel ( int  upperPeriod,
int  lowerPeriod 
)

Initializes a new instance of the DonchianChannel class.

Parameters
upperPeriodThe period for the upper channel.
lowerPeriodThe period for the lower channel

Definition at line 54 of file DonchianChannel.cs.

◆ DonchianChannel() [3/4]

QuantConnect.Indicators.DonchianChannel.DonchianChannel ( string  name,
int  period 
)

Initializes a new instance of the DonchianChannel class.

Parameters
nameThe name.
periodThe period for both the upper and lower channels.

Definition at line 64 of file DonchianChannel.cs.

◆ DonchianChannel() [4/4]

QuantConnect.Indicators.DonchianChannel.DonchianChannel ( string  name,
int  upperPeriod,
int  lowerPeriod 
)

Initializes a new instance of the DonchianChannel class.

Parameters
nameThe name.
upperPeriodThe period for the upper channel.
lowerPeriodThe period for the lower channel

Definition at line 75 of file DonchianChannel.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.DonchianChannel.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, which by convention is the mean value of the upper band and lower band.

Definition at line 98 of file DonchianChannel.cs.

◆ Reset()

override void QuantConnect.Indicators.DonchianChannel.Reset ( )

Resets this indicator to its initial state

Definition at line 108 of file DonchianChannel.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.DonchianChannel.IsReady => UpperBand.IsReady && LowerBand.IsReady

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

Definition at line 86 of file DonchianChannel.cs.

Property Documentation

◆ UpperBand

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.DonchianChannel.UpperBand
get

Gets the upper band of the Donchian Channel.

Definition at line 33 of file DonchianChannel.cs.

◆ LowerBand

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.DonchianChannel.LowerBand
get

Gets the lower band of the Donchian Channel.

Definition at line 38 of file DonchianChannel.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.DonchianChannel.WarmUpPeriod
get

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

Definition at line 91 of file DonchianChannel.cs.


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