# hhv()

ICE Data Services -

 hhv() Series Functions

The hhv() function (highest,high value) is used to create a Series Object of the hhv value found in a series within a specified number of bars.

Syntax
hhv(  nLength [, Series | sym() | inv() ][, nBarIndex ] )

Parameters
Parameter: Description: Default:
nLength Required. Number of periods to use for calculation.

n/a Series or
sym() or
inv()
[Optional]  Series Object or function of sym() or inv() to determine symbol/interval source for the study.

Chart's sym/inv nBarIndex [Optional]  Bar index of series to retrieve. See Notes.

n/a

Return Value(s)

Returns a Series Object when nBarIndex is not specified.

Returns a single value when nBarIndex is specified.

Notes
The nBarIndex parameter is available only starting with version 10.5

Code Examples
 ``function main() { //create a Series Object of the hhv close price. var xSeries = ``hh``v(``10``)``;`` ` //create a Series Object of the hhv high price. var xSeries = ``hh``v(``10``, ``high()``)``;`
``	//create a Series Object of the hhv high price of IBM. 	var xSeries = ``hh``v(``10``, ``high(sym("IBM"))``)``;``
``	//create a Series Object of the hhv high price from 15 min interval. 	var xSeries = ``hh``v(``10``, ``high(inv(15))``)``;``
``	//create a Series Object of the hhv value from sma(20). 	var xSeries = ``hh``v(``10``, ``sma(20)``)``;``
``	//retrieve a single value for the current bar. 	var nValue_0 = ``hh``v(``10``, ``0``)``;``
``	//retrieve a single value for the previous bar. 	var nValue_1 = ``hh``v(``10``, ``-1``)``;``
``}``