GetValue

GetValue ( int max offset , IDataHolder data , IDataHolder dynamic offset , int max offset );

Default values:

max offset: 0 max offset: 0

Description

Returns the value of data with the specified dynamic offset.

Note: For positive offset values, dynamic offset should be less than or equal to max offset. For negative offset values, dynamic offset should be less than or equal to max offset.

Input parameters

Parameter Default value Description
data - Defines data to be returned.
dynamic offset -

Defines expression with which the dynamic offset is calculated.

max offset 0

Defines the maximum value of the dynamic offset by adjusting the past or future offset value. This value is positive for the past dynamic offset and negative for the dynamic future offset. When set to zero, the offset is not adjusted.

Example

plot ClosingPriceForHighestHigh = GetValue(close, GetMaxValueOffset(high, 12), 12);

The example script plots the close price of a bar that contains the highest high price among the last twelve bars.