LowestBars

Category: Instructions

The LowestBars function in ProBuilder language is designed to identify the position of the lowest value within a specified period of bars. This function is particularly useful for traders and analysts who need to determine how many bars ago the lowest price or value occurred in a given dataset.

Syntax:

LowestBars[Period](source)

Parameters:

  • Period: This is an integer that specifies the number of past bars to consider in the search for the lowest value.
  • Source: This refers to the data series (such as close, open, high, low) from which the lowest value is to be found.

Example:

a = LowestBars[20](low)
return a

In this example, the LowestBars function is used to find the bar position of the lowest low price in the last 20 bars. The result is stored in the variable a. If the lowest value is found at the current bar, it returns 0; if it’s found at the previous bar, it returns 1, and so on. If no lower value is found within the specified period, it returns -1.

Additional Information:

  • The function is zero-based, meaning that the current bar is considered as ‘0’. This is important to remember when interpreting the result.
  • If multiple bars have the same lowest value, the function returns the first bar (closest to the current bar) where this value occurs.
  • Using a period that exceeds the available data range will still function but will only consider the available bars.

This function is essential for technical analysis, particularly when looking for historical lows over a specific period as part of a trading strategy or market analysis.

Related Instructions:

  • Highest indicators
  • HighestBars instructions
  • Lowest indicators
  • Logo Logo
    Loading...