Table of Contents

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
IPersistable
ICloneable<IIndicator>
Derived
Inherited Members
Extension Methods

Constructors

LengthIndicator()

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

int

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

int

Methods

CalcIsFormed()

Calc IsFormed.

protected override bool CalcIsFormed()

Returns

bool

IsFormed

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings 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 SettingsStorage

Settings storage.

ToString()

public override string ToString()

Returns

string