Class TrueRange
- Namespace
- StockSharp.Algo.Indicators
- Assembly
- StockSharp.Algo.dll
True range.
[Display(ResourceType = typeof(LocalizedStrings), Name = "TR", Description = "TrueRange")]
[IndicatorIn(typeof(CandleIndicatorValue))]
public class TrueRange : BaseIndicator, IIndicator, IPersistable, ICloneable<IIndicator>, ICloneable
- Inheritance
-
TrueRange
- Implements
-
IPersistableICloneable<IIndicator>
- Derived
- Inherited Members
- Extension Methods
Remarks
Constructors
TrueRange()
Initializes a new instance of the TrueRange.
public TrueRange()
Properties
Measure
public override IndicatorMeasures Measure { get; }
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
GetPriceMovements(ICandleMessage, ICandleMessage)
To get price components to select the maximal value.
protected virtual decimal[] GetPriceMovements(ICandleMessage currentCandle, ICandleMessage prevCandle)
Parameters
currentCandle
ICandleMessageThe current candle.
prevCandle
ICandleMessageThe previous candle.
Returns
- decimal[]
Price components.
OnProcess(IIndicatorValue)
To handle the input value.
protected override IIndicatorValue OnProcess(IIndicatorValue input)
Parameters
input
IIndicatorValueThe input value.
Returns
- IIndicatorValue
The resulting value.
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()