DLow

Category: Constants

Definition: The DLow function in ProBuilder language is used to retrieve the lowest price of a specific bar within a given number of days from the current trading day. This function is particularly useful for traders who analyze historical low prices to make informed trading decisions.

Syntax:

DLow(N)

Where N represents the number of bars back from the current bar. N = 0 refers to the current bar, N = 1 is the previous bar, and so on.

Example:

// Finding the lowest low of the last 10 bars
NewLowest = 0
FOR a = 0 TO 10 DO
    IF DLow(a) < NewLowest OR NewLowest = 0 THEN
        NewLowest = DLow(a)
    ENDIF
NEXT
RETURN NewLowest

This example initializes a variable NewLowest to zero and iterates through the last 10 bars (including the current bar) to find the lowest low price. The DLow(a) function is used within a loop to check each bar's low price. If a new lower price is found, or if NewLowest is still zero (indicating the first iteration), NewLowest is updated to this new low value.

Additional Information:

  • The DLow function is essential for strategies that require tracking the lowest prices over a specific period, such as breakout or reversal strategies.
  • It is important to ensure that the value of N does not exceed the available historical data in your chart, as this will result in an error or incorrect calculations.

Understanding how to use the DLow function effectively can help in creating robust trading strategies that respond to historical price lows.

Related Instructions:

  • DClose constants
  • DHigh constants
  • DOpen constants
  • Logo Logo
    Loading...