NthLowestBar (Function)

image\trumpet2.gif Disclaimer

The NthLowestBar function will return the number of bars ago the lowest, second lowest, third lowest (and so on) price occurred.

Syntax

NthLowestBar(N, Price, Length)

Returns (Integer)

A numeric value containing the number of bars ago the ’N’th lowest occurrence of Price occurred.

Parameters

Name

Type

Description

N

Numeric

The occurrence to return. 1 = lowest, 2 = 2nd lowest, and so on.

Price

Numeric

Specifies which bar value (price, function, or formula) to compare for the lowest occurrence.

Length

Numeric

The number of trailing bars to consider.

Remarks

Just like the LowestBar function, NthLowestBar has the inputs Price and Length. It also has the input N that allows you to specify if it is the second, third, and so on lowest value desired.

  The Length input in the NthLowestBar function can only be replaced with a value equal to or less than 100. The value for N should not be greater than the value for the input Length.

Example

Returns the number of bars ago that the 2nd  lowest Close occurred during the past 21 bars.

Value1 = NthLowestBar(2, Close, 21);