.netCHARTING v10.5 Documentation


dotnetCHARTING Namespace > FinancialEngine Class > TriangularMovingAverage Method : TriangularMovingAverage(SeriesCollection,ElementValue,Int32) Method
A collection of series objects. For example, to evaluate this indicator for two series you will need to pass a series collection containing this two series.
Specifies the particular element value (for example High, Low, Close or Open of the FinancialEngine time series) which will be considered within this indicator evaluation. In particular, if you wish to use the element value high then you should pass the parameter High. In a similarly fashion if you wish to use the low, close or open, then you should pass the parameter Low, Close, Open, respectively.
The number of periods over which the moving average is evaluated for each period.
TriangularMovingAverage(SeriesCollection,ElementValue,Int32) Method
Evaluates the x-period Triangular Moving Average(TMA) where x corresponds to the length of the time series array given as a parameter, for all periods for which sufficient data is provided.
Syntax
'Declaration
 
Public Overloads Shared Function TriangularMovingAverage( _
   ByVal sc As SeriesCollection, _
   ByVal elementValue As ElementValue, _
   ByVal lengthOfMA As Integer _
) As SeriesCollection
'Usage
 
Dim sc As SeriesCollection
Dim elementValue As ElementValue
Dim lengthOfMA As Integer
Dim value As SeriesCollection
 
value = FinancialEngine.TriangularMovingAverage(sc, elementValue, lengthOfMA)
public static SeriesCollection TriangularMovingAverage( 
   SeriesCollection sc,
   ElementValue elementValue,
   int lengthOfMA
)

Parameters

sc
A collection of series objects. For example, to evaluate this indicator for two series you will need to pass a series collection containing this two series.
elementValue
Specifies the particular element value (for example High, Low, Close or Open of the FinancialEngine time series) which will be considered within this indicator evaluation. In particular, if you wish to use the element value high then you should pass the parameter High. In a similarly fashion if you wish to use the low, close or open, then you should pass the parameter Low, Close, Open, respectively.
lengthOfMA
The number of periods over which the moving average is evaluated for each period.

Return Value

A series where the first term is the value of the MA corresponding to the most recent period, the second term is the value of the MA on the previous period and so on.
Remarks

Further Explanation

The TMA is a special case of the WeightedMovingAverage, where the term triangular is motivated by the way in which the weights are chosen for the elements of the time series array. For example, for a 7-period TMA, that is when the time series has length 7, the corresponding weights of the time series elements are: 1, 2, 3, 4, 3, 2, 1. In the case of the 6 period TMA the weights would be 1, 2, 3, 3, 2, 1.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also