First ( IDataHolder data );
Description
Returns the value of the parameter expression in the first bar.
Input parameters
| Parameter | Default value | Description |
|---|---|---|
| data | - | Defines expression whose value is returned. |
Example
declare lower;
def close1 = First(close);
plot Data = (close - close1) / close1 * 100;
The code calculates the close price percentage move on the analogy of the Percentage View mode for charts. In this example the parameter expression for the first function is close. This means that the close1 variable always holds close for the first bar.