Table of Contents

Class MeanAbsoluteDeviation

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll

This indicator computes the n-period mean absolute deviation.

public class MeanAbsoluteDeviation : WindowIndicator, IIndicator, IUpdatable
Inheritance
MeanAbsoluteDeviation
Implements
Inherited Members
Extension Methods

Constructors

MeanAbsoluteDeviation(int)

Initializes a new instance of the MeanAbsoluteDeviation class with the specified period.

Evaluates the mean absolute deviation of samples in the lookback period.

public MeanAbsoluteDeviation(int period)

Parameters

period int

The sample size of the standard deviation

MeanAbsoluteDeviation(string, int)

Initializes a new instance of the MeanAbsoluteDeviation class with the specified period.

Evaluates the mean absolute deviation of samples in the look-back period.

public MeanAbsoluteDeviation(string name, int period)

Parameters

name string

The name of this indicator

period int

The sample size of the mean absolute deviation

Properties

IsReady

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

public override bool IsReady { get; }

Property Value

bool

Mean

Gets the mean used to compute the deviation

public IndicatorBase Mean { 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(IReadOnlyWindow<long>, IReadOnlyWindow<DoubleArray>, long, DoubleArray)

Computes the next value of this indicator from the given state

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

Parameters

timeWindow IReadOnlyWindow<long>
window IReadOnlyWindow<DoubleArray>

The window for the input history

time long
input DoubleArray

The input given to the indicator

Returns

DoubleArray

A new value for this indicator

Reset()

Resets this indicator and its sub-indicator Mean to their initial state

public override void Reset()