Class SingleIndicatorValue<TValue>
- Namespace
- StockSharp.Algo.Indicators
- Assembly
- StockSharp.BusinessEntities.dll
The base value of the indicator, operating with one data type.
public abstract class SingleIndicatorValue<TValue> : BaseIndicatorValue, IIndicatorValue, IComparable<IIndicatorValue>, IComparable
Type Parameters
TValue
Value type.
- Inheritance
-
SingleIndicatorValue<TValue>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
SingleIndicatorValue(IIndicator, DateTimeOffset)
Initializes a new instance of the SingleIndicatorValue<TValue>.
protected SingleIndicatorValue(IIndicator indicator, DateTimeOffset time)
Parameters
indicator
IIndicatorIndicator.
time
DateTimeOffset
SingleIndicatorValue(IIndicator, TValue, DateTimeOffset)
Initializes a new instance of the SingleIndicatorValue<TValue>.
protected SingleIndicatorValue(IIndicator indicator, TValue value, DateTimeOffset time)
Parameters
indicator
IIndicatorIndicator.
value
TValueValue.
time
DateTimeOffset
Properties
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
Value
Value.
public TValue Value { get; protected set; }
Property Value
- TValue
Methods
CompareTo(IIndicatorValue)
public override int CompareTo(IIndicatorValue other)
Parameters
other
IIndicatorValue
Returns
FromValues(object[])
Convert to indicator value.
public override void FromValues(object[] values)
Parameters
values
object[]
GetValue<T>(Level1Fields?)
To get the value by the data type.
public override T GetValue<T>(Level1Fields? field)
Parameters
field
Level1Fields?Field specified value source.
Returns
- T
Value.
Type Parameters
T
The data type, operated by indicator.
ToString()
public override string ToString()
Returns
ToValues()
Convert to primitive values.
public override IEnumerable<object> ToValues()
Returns
- IEnumerable<object>
Primitive values.
Operators
explicit operator TValue(SingleIndicatorValue<TValue>)
Cast object from SingleIndicatorValue<TValue> to TValue
.
public static explicit operator TValue(SingleIndicatorValue<TValue> value)
Parameters
value
SingleIndicatorValue<TValue>Object SingleIndicatorValue<TValue>.
Returns
- TValue
TValue
value.