IIndicator
The interface describing indicator.
Implements: IPersistable, ICloneable<IIndicator>, ICloneable
Properties
public Color? Color { get; }
value = iIndicator.Color
Indicator color. If then the color will be automatically selected.
public IIndicatorContainer Container { get; }
value = iIndicator.Container
The container storing indicator data.
public bool IsPreloaded { get; }
value = iIndicator.IsPreloaded
Indicates whether the indicator has been preloaded with historical/external values.
public string Name { get; set; }
value = iIndicator.Name
iIndicator.Name = value
Indicator name.
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.
public Level1Fields? Source { get; set; }
value = iIndicator.Source
iIndicator.Source = value
Field specified value source.
Methods
public IIndicatorValue CreateValue(DateTime time, object[] values)
result = iIndicator.CreateValue(time, values)
Convert to indicator value.
- time
- Time
- values
- ToValues
Returns: IIndicatorValue
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.
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.
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
public event Action<IIndicatorValue, IIndicatorValue> Changed
iIndicator.Changed += handler
The indicator change event (for example, a new value is added).
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).