SineWave

StockSharp.Algo.Indicators

Sine Wave indicator.

Inherits: BaseComplexIndicator<ISineWaveValue>

Constructors

SineWave
public SineWave()
sineWave = SineWave()

Initializes a new instance of the SineWave.

Properties

Lead
public SineWaveLine Lead { get; }
value = sineWave.Lead

Lead line.

Length
public int Length { get; set; }
value = sineWave.Length
sineWave.Length = value

Period length.

Main
public SineWaveLine Main { get; }
value = sineWave.Main

Main line.

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

IndicatorMeasures.

NumValuesToInitialize
public override int NumValuesToInitialize { get; }
value = sineWave.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 = sineWave.CalcIsFormed()

Calc IsFormed.

Returns: IsFormed

CreateValue
protected override ISineWaveValue CreateValue(DateTime time)
result = sineWave.CreateValue(time)

Create .

time
Time
LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = sineWave.LoadAsync(storage, cancellationToken)

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

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

To handle the input value.

input
The input value.

Returns: The resulting value.

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

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

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

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

Returns: A string representing the tuple's values.