Class DonchianChannel
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
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.
public class DonchianChannel : BarIndicator, IIndicator, IUpdatable
- Inheritance
-
DonchianChannel
- Implements
- Inherited Members
- Extension Methods
Constructors
DonchianChannel(int)
Initializes a new instance of the DonchianChannel class.
public DonchianChannel(int period)
Parameters
periodintThe period for both the upper and lower channels.
DonchianChannel(int, int)
Initializes a new instance of the DonchianChannel class.
public DonchianChannel(int upperPeriod, int lowerPeriod)
Parameters
DonchianChannel(string, int)
Initializes a new instance of the DonchianChannel class.
public DonchianChannel(string name, int period)
Parameters
DonchianChannel(string, int, int)
Initializes a new instance of the DonchianChannel class.
public DonchianChannel(string name, int upperPeriod, int lowerPeriod)
Parameters
namestringThe name.
upperPeriodintThe period for the upper channel.
lowerPeriodintThe period for the lower channel
Properties
IsReady
Gets a flag indicating when this indicator is ready and fully initialized
public override bool IsReady { get; }
Property Value
LowerBand
Gets the lower band of the Donchian Channel.
public IndicatorBase LowerBand { get; }
Property Value
UpperBand
Gets the upper band of the Donchian Channel.
public IndicatorBase UpperBand { get; }
Property Value
WarmUpPeriod
Required period, in data points, for the indicator to be ready and fully initialized.
public override int WarmUpPeriod { get; }
Property Value
Methods
Forward(long, DoubleArray)
Computes the next value of this indicator from the given state
protected override DoubleArray Forward(long time, DoubleArray input)
Parameters
timelonginputDoubleArrayThe input given to the indicator
Returns
- DoubleArray
A new value for this indicator, which by convention is the mean value of the upper band and lower band.
Reset()
Resets this indicator to its initial state
public override void Reset()