MassIndex

StockSharp.Algo.Indicators

Mass Index.

Inherits: DecimalLengthIndicator

Constructors

MassIndex
public MassIndex()
massIndex = MassIndex()

Initializes a new instance of the MassIndex.

Properties

EmaLength
public int EmaLength { get; set; }
value = massIndex.EmaLength
massIndex.EmaLength = value

ExponentialMovingAverage

Measure
public override IndicatorMeasures Measure { get; }
value = massIndex.Measure

IndicatorMeasures.

NumValuesToInitialize
public override int NumValuesToInitialize { get; }
value = massIndex.NumValuesToInitialize

Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals ). if undefined.

Methods

CalcIsFormed
protected override bool CalcIsFormed()
result = massIndex.CalcIsFormed()

Calc IsFormed.

Returns: IsFormed

LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = massIndex.LoadAsync(storage, cancellationToken)

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

OnProcessDecimal
protected override decimal? OnProcessDecimal(IIndicatorValue input)
result = massIndex.OnProcessDecimal(input)

To handle the input value.

input
The input value.

Returns: The new value of the indicator.

Reset
public override void Reset()
massIndex.Reset()

To reset the indicator status to initial. The method is called each time when initial settings are changed (for example, the length of period).

SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = massIndex.SaveAsync(storage, cancellationToken)

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

ToString
public override string ToString()
result = massIndex.ToString()

Returns a string representation of the tuple, with values separated by commas.

Returns: A string representing the tuple's values.