Table of Contents

Class MovingAverageTypeExtensions

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll

Provides extension methods for the MovingAverageType enumeration

public static class MovingAverageTypeExtensions
Inheritance
MovingAverageTypeExtensions
Inherited Members

Methods

AsIndicator(MovingAverageType, int)

Creates a new indicator from the specified MovingAverageType. So if MovingAverageType.Simple is specified, then a new SimpleMovingAverage will be returned.

public static IndicatorBase AsIndicator(this MovingAverageType movingAverageType, int period)

Parameters

movingAverageType MovingAverageType

The type of averaging indicator to create

period int

The smoothing period

Returns

IndicatorBase

A new indicator that matches the MovingAverageType

AsIndicator(MovingAverageType, string, int)

Creates a new indicator from the specified MovingAverageType. So if MovingAverageType.Simple is specified, then a new SimpleMovingAverage will be returned.

public static IndicatorBase AsIndicator(this MovingAverageType movingAverageType, string name, int period)

Parameters

movingAverageType MovingAverageType

The type of averaging indicator to create

name string

The name of the new indicator

period int

The smoothing period

Returns

IndicatorBase

A new indicator that matches the MovingAverageType