Class SingleIndicatorValue<TValue>
- Namespace
- StockSharp.Algo.Indicators
- Assembly
- StockSharp.Algo.dll
The base value of the indicator, operating with one data type.
public 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)
Initializes a new instance of the SingleIndicatorValue<TValue>.
public SingleIndicatorValue(IIndicator indicator)
Parameters
indicator
IIndicatorIndicator.
SingleIndicatorValue(IIndicator, TValue)
Initializes a new instance of the SingleIndicatorValue<TValue>.
public SingleIndicatorValue(IIndicator indicator, TValue value)
Parameters
indicator
IIndicatorIndicator.
value
TValueValue.
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.
IsSupport(Type)
Does value support data type, required for the indicator.
public override bool IsSupport(Type valueType)
Parameters
valueType
TypeThe data type, operated by indicator.
Returns
SetValue<T>(IIndicator, T)
To replace the indicator input value by new one (for example it is received from another indicator).
public override IIndicatorValue SetValue<T>(IIndicator indicator, T value)
Parameters
indicator
IIndicatorIndicator.
value
TValue.
Returns
- IIndicatorValue
New object, containing input 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.