BullScript: Highest/Lowest Functions

Highest/Lowest Functions

This section lists functions specifically designed to identify the highest and lowest bar in a range.

Highest

Usage

HIGHEST(EXPR[,N])
HHV(EXPR[,N])
expr
The expression being evaluated.
n
The number of bars over which expr is evaluated.

Description

Returns the highest (numerically largest) value expr has assumed over the last n periods. That is, counting the current bar and the n-1 previous bars. If n is not given, then it will return the highest value expr has assumed over the entire dataset. Not to be confused with Max.

The related HighestBars function can be used to determine which bar was the highest.

Example

highest(H,10) is the highest high value for the last 10 bars.
highest(V,15) is the highest volume for any one bar over the last 15.
highest(H) is the highest high value for the entire dataset.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

HighestBars | Lowest | Max | Min

HighestBars

Usage

HIGHESTBARS(EXPR[,N])
HHVBARS(EXPR[,N])
expr
The expression being evaluated.
n
The number of bars over which expr is evaluated.

Description

Returns the number of bars ago that expr was the highest it has been over the last n bars. That is, including the current bar and the n-1 previous bars. Or if n is not given, the number of bars ago it was at its highest for the entire dataset.

The related Highest function can be used to determine the value of this bar.

Example

highest(H,10) is the highest high value for the last 10 bars.
highest(H) is the highest high value for the entire dataset.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

Highest | LowestBars

HighestSince

Usage

HIGHESTSINCE(N,EXPR1,EXPR2)
n
The number of times ago that expr1 was true.
expr1
A boolean expression that evaluates to true or false.
expr2
The expression that highest will be calculated from.

Description

Returns the highest value expr2 has assumed since the nth time ago that expr1was true.

The related HighestSinceBars function can be used to determine which bar returned this value.

Example

highestsince(4,cross(mov(C,7),mov(C,21)),C)
returns the highest close price that has occurred since the fourth time ago that the 7-day simple moving average crossed the 21-day simple moving average.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

Highest | HighestSinceBars | LowestSince

HighestSinceBars

Usage

HIGHESTSINCEBARS(N,EXPR1,EXPR2)
n
The number of times ago that expr1 was true.
expr1
A boolean expression that evaluates to true or false.
expr2
The expression that highest will be calculated from.

Description

Returns the number of bars since the highest value of expr2 was assumed since the nth time ago that expr1 was true.

The related HighestSince function returns what expr2 was on this bar.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

HighestBars | HighestSince | LowestSinceBars

Lowest

Usage

LOWEST(EXPR[,N])
LLV(EXPR[,N])
expr
The expression being evaluated.
n
The number of bars over which expr is evaluated.

Description

Returns the lowest value expr has assumed over the last n periods. That is, counting the current bar and the n-1 previous bars. If n is not given, then it will return the lowest value expr has assumed over the entire dataset. Not to be confused with Min.

The related LowestBars function can be used to determine which bar was the lowest.

Example

lowest(L,10) is the lowest low value for the last 10 bars.
lowest(V,15) is the loweset volume for any one bar over the last 15.
lowest(L) is the lowest low value for the entire dataset.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

Highest | LowestBars | Max | Min

LowestBars

Usage

LOWESTBARS(EXPR[,N])
LLVBARS(EXPR[,N])
expr
The expression being evaluated.
n
The number of bars over which expr is evaluated.

Description

Returns the number of bars ago that expr was the lowest it has been over the last n bars. That is, including the current bar and the n-1 previous bars. Or if n is not given, the number of bars ago it was at its lowest for the entire dataset.

The related Lowest function can be used to determine the value of this bar.

Example

lowest(H,10) is the lowest low value for the last 10 bars.
lowest(H) is the lowest low value for the entire dataset.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

Lowest | HighestBars

LowestSince

Usage

LOWESTSINCE(N,EXPR1,EXPR2)
n
The number of times ago that expr1 was true.
expr1
A boolean expression that evaluates to true or false.
expr2
The expression that lowest will be calculated from.

Description

Returns the lowest value expr2 has assumed since the nth time ago that expr1was true.

The related LowestSinceBars function can be used to determine which bar returned this value.

Example

lowestsince(4,cross(mov(C,7),mov(C,21)),C)  returns the lowest close price that has occurred since the fourth time ago that the 7-day simple moving average crossed the 21-day simple moving average.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

Lowest | LowestSinceBars | HighestSince

LowestSinceBars

Usage

LOWESTSINCEBARS(N,EXPR1,EXPR2)
n
The number of times ago that expr1 was true.
expr1
A boolean expression that evaluates to true or false.
expr2
The expression that lowest will be calculated from.

Description

Returns the number of bars since the lowest value of expr2 was assumed since the nth time ago that expr1 was true.

The related LowestSince function returns what expr2 was on this bar.

Comparison Table

Finds Examines Returns
highest highest last N bars value found
highestbars highest last N bars bars since value was found
highestsince highest since event occurred N times value found
highestsincebars highest since event occurred N times bars since value was found
lowest lowest last N bars value found
lowestbars lowest last N bars bars since value was found
lowestsince lowest since event occurred N times value found
lowestsincebars lowest since event occurred N times bars since value was found
max highest several values on current bar value found
min lowest several values on current bar value found

See Also

HighestSinceBars | LowestBars | LowestSince

Was this article helpful?

Related Articles