Class LengthIndicator<TResult>
- Namespace
- StockSharp.Algo.Indicators
- Assembly
- StockSharp.Algo.dll
The base class for indicators with one resulting value and based on the period.
public abstract class LengthIndicator<TResult> : BaseIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
Type Parameters
TResult
Result values type.
- Inheritance
-
LengthIndicator<TResult>
- Implements
-
IPersistableICloneable<IIndicator>
- Derived
- Inherited Members
- Extension Methods
Constructors
LengthIndicator()
Initialize LengthIndicator<TResult>.
protected LengthIndicator()
Properties
Buffer
The buffer for data storage.
[Browsable(false)]
protected CircularBufferEx<TResult> Buffer { get; }
Property Value
- CircularBufferEx<TResult>
Length
Period length. By default equal to 1.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Period", Description = "PeriodLength", GroupName = "General")]
public virtual int Length { get; set; }
Property Value
NumValuesToInitialize
Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals true). null if undefined.
public override int NumValuesToInitialize { get; }
Property Value
Methods
CalcIsFormed()
Calc IsFormed.
protected override bool CalcIsFormed()
Returns
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
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 void Reset()
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
ToString()
public override string ToString()