Class ComplexIndicatorValue<TIndicator>
- Namespace
- StockSharp.Algo.Indicators
- Assembly
- StockSharp.BusinessEntities.dll
The complex value of the indicator IComplexIndicator, derived as result of calculation.
public abstract class ComplexIndicatorValue<TIndicator> : BaseIndicatorValue, IComplexIndicatorValue, IIndicatorValue, IComparable<IIndicatorValue>, IComparable where TIndicator : IComplexIndicator
Type Parameters
TIndicatorType of the complex indicator.
- Inheritance
-
ComplexIndicatorValue<TIndicator>
- Implements
- Derived
- Inherited Members
- Extension Methods
Remarks
Initializes a new instance of the ComplexIndicatorValue<TIndicator>.
Constructors
ComplexIndicatorValue(TIndicator, DateTimeOffset)
The complex value of the indicator IComplexIndicator, derived as result of calculation.
protected ComplexIndicatorValue(TIndicator indicator, DateTimeOffset time)
Parameters
indicatorTIndicatorIndicator.
timeDateTimeOffset
Remarks
Initializes a new instance of the ComplexIndicatorValue<TIndicator>.
Properties
InnerValues
Embedded values.
public IDictionary<IIndicator, IIndicatorValue> InnerValues { get; }
Property Value
IsEmpty
No indicator value.
public override bool IsEmpty { get; set; }
Property Value
IsFinal
Is the value final (indicator finalizes its value and will not be changed anymore in the given point of time).
public override bool IsFinal { get; set; }
Property Value
this[IIndicator]
Gets a value of inner indicator.
public IIndicatorValue this[IIndicator indicator] { get; }
Parameters
indicatorIIndicator
Property Value
TypedIndicator
The complex indicator, based on which the value is calculated.
public TIndicator TypedIndicator { get; }
Property Value
- TIndicator
Methods
Add(IIndicator, IIndicatorValue)
Add a value of inner indicator.
public virtual void Add(IIndicator indicator, IIndicatorValue value)
Parameters
indicatorIIndicatorvalueIIndicatorValue
CompareTo(IIndicatorValue)
public override int CompareTo(IIndicatorValue other)
Parameters
otherIIndicatorValue
Returns
FromValues(object[])
Convert to indicator value.
public override void FromValues(object[] values)
Parameters
valuesobject[]
GetValue<T>(Level1Fields?)
To get the value by the data type.
public override T GetValue<T>(Level1Fields? field)
Parameters
fieldLevel1Fields?Field specified value source.
Returns
- T
Value.
Type Parameters
TThe data type, operated by indicator.
SetInnerDecimal(IIndicator, DateTimeOffset, decimal?, bool)
Set the inner value of the indicator as decimal.
public void SetInnerDecimal(IIndicator indicator, DateTimeOffset time, decimal? value, bool isFinal)
Parameters
indicatorIIndicatorInner indicator, for which the value is set.
timeDateTimeOffsetTime of the value, which is set.
valuedecimal?Value of the indicator as decimal or null if the value is empty.
isFinalbool
ToValues()
Convert to primitive values.
public override IEnumerable<object> ToValues()
Returns
- IEnumerable<object>
Primitive values.
TryGet(IIndicator, out IIndicatorValue)
Try get a value of inner indicator.
public bool TryGet(IIndicator indicator, out IIndicatorValue value)
Parameters
indicatorIIndicatorvalueIIndicatorValue
Returns
- bool
Operation result.