DHigh is a function in ProBuilder language used to retrieve the highest price of a specific bar within a given number of days from the current trading day. This function is particularly useful for analyzing price trends over a specified period by identifying the maximum price reached each day.
DHigh(N)
Where N represents the number of bars (days) back from the current bar. N is zero-indexed, meaning N=0 refers to the current bar, N=1 refers to one bar ago, and so on.
// Calculate the highest high of the last 10 bars
Newhighest = 0
FOR a = 0 TO 9 DO
IF DHigh(a) > Newhighest THEN
Newhighest = DHigh(a)
ENDIF
NEXT
RETURN Newhighest
This example initializes a variable Newhighest to zero and iterates through the last 10 bars (from the current bar to 9 bars ago). During each iteration, it compares the high of each bar with Newhighest. If a higher value is found, it updates Newhighest with that value. Finally, it returns the highest value found over the specified period.
This function is a fundamental tool in technical analysis within the ProBuilder environment, helping users to programmatically assess and utilize historical price data in their trading strategies.