Value
Previous Topic  Next Topic 

Definition

Value references the 1st DataSeries object Values[0] in the indicator. This is the primary indicator value.


Property Value

A DataSeries object.


Syntax

Value


Examples

// OnBarUpdate method of a custom indicator
protected override void OnBarUpdate()
{
    // Checks the indicator primary value 1 bar agao and sets the value of the indicator
    // for the current bar being evaluated
    if (Value[1] < High[0] - Low[0])
        Value.Set(High[0] - Low[0]);
    else
        Value.Set(High[0] - Close[0]);
}


Tips
1. The DataSeries object referenced by this property is created by calling the Add() method.