NinjaScript > Language Reference > Data >

HighestBar()

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Returns the number of bars ago the highest price value occurred for the lookback period.
 

Method Return Value

An int value that represents number of bars ago.

 

Syntax
HighestBar(IDataSeries series, int period)

 

Parameters

period

Number of bars to include in the calculation

series

Any DataSeries type object such as an indicator, Close, High, Low, etc...

 

 

Examples

// Prints out the number of bars ago for the highest close of the current session
Print(HighestBar(Close, Bars.BarsSinceSession - 1).ToString());