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
movingAverageTypeMovingAverageTypeThe type of averaging indicator to create
periodintThe 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
movingAverageTypeMovingAverageTypeThe type of averaging indicator to create
namestringThe name of the new indicator
periodintThe smoothing period
Returns
- IndicatorBase
A new indicator that matches the MovingAverageType