CandlePatternIndicator
Indicator, based on ICandlePattern.
Inherits: BaseIndicator
Constructors
public CandlePatternIndicator()
candlePatternIndicator = CandlePatternIndicator()
Initializes a new instance of the CandlePatternIndicator.
Properties
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.
public ICandlePattern Pattern { get; set; }
value = candlePatternIndicator.Pattern
candlePatternIndicator.Pattern = value
Candle pattern. It is prepared by CancellationToken).
Methods
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = candlePatternIndicator.LoadAsync(storage, cancellationToken)
Load settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
protected override IIndicatorValue OnProcess(IIndicatorValue input)
result = candlePatternIndicator.OnProcess(input)
To handle the input value.
- input
- The input value.
Returns: The resulting value.
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
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).
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = candlePatternIndicator.SaveAsync(storage, cancellationToken)
Save settings.
- storage
- Settings storage.
- cancellationToken
- CancellationToken
Returns: Task
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.