Value

View as Markdown

Definition

A collection of historical references to the first ISeries object Values[0] in the indicator. This is the primary indicator value (synched to the primary series in case of a MultiSeries indicator)

Property Value

An ISeries<double> object.

Syntax

Value

Examples

1// OnBarUpdate method of a custom indicator
2protected override void OnBarUpdate()
3{
4 // Ensures we have enough bars loaded for our indicator
5 if (CurrentBar < 1)
6 return;
7
8 // Evaluates the indicator primary value 1 bar ago and sets the value of the indicator
9 // for the current bar being evaluated
10 if (Value[1] < High[0] - Low[0])
11 Value[0] = High[0] - Low[0];
12 else
13 Value[0] = High[0] - Close[0];
14}