IIndicator

StockSharp.Algo.Indicators

The interface describing indicator.

Implements: IPersistable, ICloneable<IIndicator>, ICloneable

Properties

Color
public Color? Color { get; }
value = iIndicator.Color

Indicator color. If then the color will be automatically selected.

Container
public IIndicatorContainer Container { get; }
value = iIndicator.Container

The container storing indicator data.

Id
public Guid Id { get; }
value = iIndicator.Id

Unique ID.

IsFormed
public bool IsFormed { get; }
value = iIndicator.IsFormed

Whether the indicator is set.

IsPreloaded
public bool IsPreloaded { get; }
value = iIndicator.IsPreloaded

Indicates whether the indicator has been preloaded with historical/external values.

Measure
public IndicatorMeasures Measure { get; }
value = iIndicator.Measure

IndicatorMeasures.

Name
public string Name { get; set; }
value = iIndicator.Name
iIndicator.Name = value

Indicator name.

NumValuesToInitialize
public int NumValuesToInitialize { get; }
value = iIndicator.NumValuesToInitialize

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

Source
public Level1Fields? Source { get; set; }
value = iIndicator.Source
iIndicator.Source = value

Field specified value source.

Style
public DrawStyles Style { get; }
value = iIndicator.Style

Chart indicator draw style.

Methods

CreateValue
public IIndicatorValue CreateValue(DateTime time, object[] values)
result = iIndicator.CreateValue(time, values)

Convert to indicator value.

time
Time
values
ToValues

Returns: IIndicatorValue

Preload
public void Preload(IEnumerable<ValueTuple<IIndicatorValue, IIndicatorValue>> values)
iIndicator.Preload(values)

Bulk preload of indicator values (input/output pairs). Implementations may override; default throws NotSupportedException.

values
Collection of finalized input/output pairs.
Process
public IIndicatorValue Process(IIndicatorValue input)
result = iIndicator.Process(input)

To handle the input value.

input
The input value.

Returns: The new value of the indicator.

Reset
public void Reset()
iIndicator.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).

Events

Changed
public event Action<IIndicatorValue, IIndicatorValue> Changed
iIndicator.Changed += handler

The indicator change event (for example, a new value is added).

Reseted
public event Action Reseted
iIndicator.Reseted += handler

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