TrueRange

StockSharp.Algo.Indicators

True range.

Inherits: BaseIndicator

Constructors

TrueRange
public TrueRange()
trueRange = TrueRange()

Initializes a new instance of the TrueRange.

Properties

Measure
public override IndicatorMeasures Measure { get; }
value = trueRange.Measure

IndicatorMeasures.

NumValuesToInitialize
public override int NumValuesToInitialize { get; }
value = trueRange.NumValuesToInitialize

Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals ). if undefined.

Methods

GetPriceMovements
protected virtual decimal[] GetPriceMovements(ICandleMessage currentCandle, ICandleMessage prevCandle)
result = trueRange.GetPriceMovements(currentCandle, prevCandle)

To get price components to select the maximal value.

currentCandle
The current candle.
prevCandle
The previous candle.

Returns: Price components.

OnProcess
protected override IIndicatorValue OnProcess(IIndicatorValue input)
result = trueRange.OnProcess(input)

To handle the input value.

input
The input value.

Returns: The resulting value.

Reset
public override void Reset()
trueRange.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).