Table of Contents

Class TriangularMovingAverage

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll
 This indicator computes the Triangular Moving Average (TRIMA). 
 The Triangular Moving Average is calculated with the following formula:

(1) When the period is even, TRIMA(x,period)=SMA(SMA(x,period/2),(period/2)+1) (2) When the period is odd, TRIMA(x,period)=SMA(SMA(x,(period+1)/2),(period+1)/2)

public class TriangularMovingAverage : Indicator, IIndicator, IUpdatable
Inheritance
TriangularMovingAverage
Implements
Inherited Members
Extension Methods

Constructors

TriangularMovingAverage(int)

Initializes a new instance of the TriangularMovingAverage class using the specified period.

public TriangularMovingAverage(int period)

Parameters

period int

The period of the indicator

TriangularMovingAverage(string, int)

Initializes a new instance of the TriangularMovingAverage class using the specified name and period.

public TriangularMovingAverage(string name, int period)

Parameters

name string

The name of this indicator

period int

The period of the indicator

Properties

IsReady

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

public override bool IsReady { get; }

Property Value

bool

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