CandlePatternIndicator

StockSharp.Algo.Indicators

Indicator, based on ICandlePattern.

Inherits: BaseIndicator

Constructors

CandlePatternIndicator
public CandlePatternIndicator()
candlePatternIndicator = CandlePatternIndicator()

Initializes a new instance of the CandlePatternIndicator.

Properties

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

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

Pattern
public ICandlePattern Pattern { get; set; }
value = candlePatternIndicator.Pattern
candlePatternIndicator.Pattern = value

Candle pattern. It is prepared by CancellationToken).

Methods

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

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

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

To handle the input value.

input
The input value.

Returns: The resulting value.

PrepareAsync
public override ValueTask PrepareAsync(CancellationToken cancellationToken)
result = candlePatternIndicator.PrepareAsync(cancellationToken)

Prepare the indicator for IIndicatorValue): do what has to be awaited before the first value.

cancellationToken
CancellationToken

Returns: ValueTask

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

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

Returns: Task

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

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

Returns: A string representing the tuple's values.