VariableMovingAverage

StockSharp.Algo.Indicators

Variable Moving Average (VMA).

Inherits: DecimalLengthIndicator

Constructors

VariableMovingAverage
public VariableMovingAverage()
variableMovingAverage = VariableMovingAverage()

Initializes a new instance of the VariableMovingAverage.

Properties

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

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

VolatilityIndex
public decimal VolatilityIndex { get; set; }
value = variableMovingAverage.VolatilityIndex
variableMovingAverage.VolatilityIndex = value

Volatility index factor. Default value is 0.2.

Methods

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

Calc IsFormed.

Returns: IsFormed

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

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

OnProcess
protected override IIndicatorValue OnProcess(IIndicatorValue input)
result = variableMovingAverage.OnProcess(input)

To handle the input value.

input
The input value.

Returns: The resulting value.

Reset
public override void Reset()
variableMovingAverage.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 = variableMovingAverage.SaveAsync(storage, cancellationToken)

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

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

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

Returns: A string representing the tuple's values.