Table of Contents

Class WindowIndicator

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll

Represents an indicator that acts on a rolling window of data in a List<T>

public abstract class WindowIndicator : IndicatorBase, IIndicator, IUpdatable
Inheritance
WindowIndicator
Implements
Derived
Inherited Members
Extension Methods

Constructors

WindowIndicator(string, int)

Initializes a new instance of the WindowIndicator class

protected WindowIndicator(string name, int period)

Parameters

name string

The name of this indicator

period int

The number of data points to hold in the window

Properties

IsReady

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

public override bool IsReady { get; }

Property Value

bool

Period

Gets the period of this window indicator

public int Period { get; }

Property Value

int

Methods

Forward(IReadOnlyWindow<long>, IReadOnlyWindow<DoubleArray>, long, DoubleArray)

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

protected abstract DoubleArray Forward(IReadOnlyWindow<long> timeWindow, IReadOnlyWindow<DoubleArray> window, long time, DoubleArray input)

Parameters

timeWindow IReadOnlyWindow<long>
window IReadOnlyWindow<DoubleArray>

The window of data held in this indicator

time long
input DoubleArray

Returns

DoubleArray

A new value for this indicator

Forward(long, DoubleArray)

Computes the next value of this indicator from the given state

protected override DoubleArray Forward(long time, DoubleArray input)

Parameters

time long
input DoubleArray

The input given to the indicator

Returns

DoubleArray

A new value for this indicator

Reset()

Resets this indicator to its initial state

public override void Reset()