Class KeltnerChannels
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
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.
public class KeltnerChannels : BarIndicator, IIndicator, IUpdatable
- Inheritance
-
KeltnerChannels
- Implements
- Inherited Members
- Extension Methods
Constructors
KeltnerChannels(int, double, MovingAverageType)
Initializes a new instance of the KeltnerChannels class
public KeltnerChannels(int period, double k, MovingAverageType movingAverageType = MovingAverageType.Simple)
Parameters
periodintThe period of the average true range and moving average (middle band)
kdoubleThe number of multiplies specifying the distance between the middle band and upper or lower bands
movingAverageTypeMovingAverageTypeThe type of moving average to be used
KeltnerChannels(string, int, double, MovingAverageType)
Initializes a new instance of the KeltnerChannels class
public KeltnerChannels(string name, int period, double k, MovingAverageType movingAverageType = MovingAverageType.Simple)
Parameters
namestringThe name of this indicator
periodintThe period of the average true range and moving average (middle band)
kdoubleThe number of multiples specifying the distance between the middle band and upper or lower bands
movingAverageTypeMovingAverageTypeThe type of moving average to be used
Properties
AverageTrueRange
Gets the average true range
public IndicatorBase AverageTrueRange { get; }
Property Value
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 channel
public IndicatorBase LowerBand { get; }
Property Value
MiddleBand
Gets the middle band of the channel
public IndicatorBase MiddleBand { get; }
Property Value
UpperBand
Gets the upper band of the 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 for this indicator from the given state.
protected override DoubleArray Forward(long time, DoubleArray input)
Parameters
timelonginputDoubleArrayThe TradeBar to this indicator on this time step
Returns
- DoubleArray
A new value for this indicator
Reset()
Resets this indicator to its initial state
public override void Reset()