DLow
DLow returns the lowest price of a daily bar in ProBuilder. Use DLow(N) to read the low from N days ago on any timeframe, without switching the chart to daily bars.
Syntax
DLow(N)N is a non-negative value giving the number of days back. DLow(0) is the current day, DLow(1) is the previous trading day, and so on.
How it works
DLow reads the low of a daily bar even when the chart runs on an intraday timeframe. On a fifteen-minute chart, DLow(1) returns yesterday's daily low rather than the low of a single fifteen-minute bar.
The argument uses parentheses and counts in trading days. On the current day, DLow(0) reflects the lowest price so far in the session and can fall further until the day closes. N must stay within the loaded daily history, otherwise the call errors.
Daily lows act as intraday support references. Comparing the current price against DLow(1) tests whether today has broken below yesterday's low, and looping over several DLow(a) values finds the lowest low across a span of days.
Examples
Example 1, Lowest daily low over ten days (Indicator)
// Track the lowest daily low across the last ten days
newLowest = DLow(0)
FOR a = 1 TO 9 DO
IF DLow(a) < newLowest THEN
newLowest = DLow(a)
ENDIF
NEXT
RETURN newLowest AS "10-day low"The loop starts from the current day's low and keeps the minimum DLow found over the window.
Example 2, Screening for a break of yesterday's low (ProScreener)
// Current price below the previous day's daily low
broke = Close < DLow(1)
SCREENER[broke] (DLow(1) AS "Prev day low")The screener returns instruments trading below the prior day's low.
Example 3, Stop under the prior daily low (ProOrder)
DEFPARAM CumulateOrders = false
IF Close CROSSES OVER Average[20](Close) THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Protective stop below yesterday's daily low
IF LONGONMARKET THEN
SELL AT DLow(1) STOP
ENDIFThe exit places a stop beneath DLow(1), using the previous daily low as a support reference.
Common errors and gotchas
- Parentheses, not brackets.
DLowtakes its argument in parentheses likeDLow(1). Square brackets are a syntax error. - Current day still forming.
DLow(0)can keep falling during the session, so tests against it shift as the day develops. UseDLow(1)for a fixed prior-day level. - Needs daily history. A large N requires enough loaded daily data, or the reference errors.
Related instructions
DHigh, the highest price of a past daily bar.DOpen, the opening price of a past daily bar.DClose, the closing price of a past daily bar.Low, the lowest price of the current timeframe's bar.High, the highest price of a bar.Close, the closing price of a bar.Range, the high minus low of a bar.CustomClose, the user-selectable price source.
