Table of Contents

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

period int

The period of the average true range and moving average (middle band)

k double

The number of multiplies specifying the distance between the middle band and upper or lower bands

movingAverageType MovingAverageType

The 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

name string

The name of this indicator

period int

The period of the average true range and moving average (middle band)

k double

The number of multiples specifying the distance between the middle band and upper or lower bands

movingAverageType MovingAverageType

The type of moving average to be used

Properties

AverageTrueRange

Gets the average true range

public IndicatorBase AverageTrueRange { get; }

Property Value

IndicatorBase

IsReady

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

public override bool IsReady { get; }

Property Value

bool

LowerBand

Gets the lower band of the channel

public IndicatorBase LowerBand { get; }

Property Value

IndicatorBase

MiddleBand

Gets the middle band of the channel

public IndicatorBase MiddleBand { get; }

Property Value

IndicatorBase

UpperBand

Gets the upper band of the channel

public IndicatorBase UpperBand { get; }

Property Value

IndicatorBase

WarmUpPeriod

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

public override int WarmUpPeriod { get; }

Property Value

int

Methods

Forward(long, DoubleArray)

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

protected override DoubleArray Forward(long time, DoubleArray input)

Parameters

time long
input DoubleArray

The 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()