BaseComplexIndicator
The base indicator, built in form of several indicators combination.
Inherits: BaseIndicator
Implements: IComplexIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
Constructors
protected BaseComplexIndicator(IIndicator[] innerIndicators)
baseComplexIndicator = BaseComplexIndicator(innerIndicators)
Initializes a new instance of the BaseComplexIndicator.
- innerIndicators
- Embedded indicators.
Properties
public IReadOnlyList<IIndicator> InnerIndicators { get; }
value = baseComplexIndicator.InnerIndicators
Embedded indicators.
public ComplexIndicatorModes Mode { get; protected set; }
value = baseComplexIndicator.Mode
baseComplexIndicator.Mode = value
Embedded indicators processing mode. The default equals to Parallel.
public override int NumValuesToInitialize { get; }
value = baseComplexIndicator.NumValuesToInitialize
Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals ). if undefined.
Methods
protected void AddInner(IIndicator inner)
baseComplexIndicator.AddInner(inner)
Add to InnerIndicators.
- inner
- Indicator.
protected override bool CalcIsFormed()
result = baseComplexIndicator.CalcIsFormed()
Calc IsFormed.
Returns: IsFormed
protected abstract TValue CreateValue(DateTime time)
result = baseComplexIndicator.CreateValue(time)
Create .
- time
- Time
public override void Load(SettingsStorage storage)
baseComplexIndicator.Load(storage)
Load settings.
- storage
- Settings storage.
protected override IIndicatorValue OnCreateValue(DateTime time)
result = baseComplexIndicator.OnCreateValue(time)
Create a new instance of IIndicatorValue for the specified time.
- time
- Time
Returns: IIndicatorValue
protected override IIndicatorValue OnProcess(IIndicatorValue input)
result = baseComplexIndicator.OnProcess(input)
To handle the input value.
- input
- The input value.
Returns: The resulting value.
public override IIndicatorValue Process(IIndicatorValue input)
result = baseComplexIndicator.Process(input)
To handle the input value.
- input
- The input value.
Returns: The new value of the indicator.
protected void RemoveInner(IIndicator inner)
baseComplexIndicator.RemoveInner(inner)
Remove from InnerIndicators.
- inner
- Indicator.
public override void Save(SettingsStorage storage)
baseComplexIndicator.Save(storage)
Save settings.
- storage
- Settings storage.