HighestBar()
Previous Topic  Next Topic 

Definition
Returns the number of bars ago the highest price value occured for the lookback period. If there are several occurences within the lookback period where the bar was the highest bar the more recent occurence is returned.




Method Return Value

An int value that represents number of bars ago.


Syntax
HighestBar(IDataSeries series, int lookBackPeriod)

Method Of

Custom Indicator, Custom Strategy


Parameters

series

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

lookBackPeriod

The number of bars to include in the calculation


Examples

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