DClose is a function in the ProBuilder language used to retrieve the closing price of a daily bar from a specified number of days ago. This function is particularly useful for analyzing historical price data on a daily timeframe within a trading strategy or study.
DClose(N)
Where N represents the number of days before the current trading day. N must be a non-negative integer, where DClose(0) would refer to the current day’s closing price.
// Calculate the closing price of the market 5 days ago
lastWeekClose = DClose(5)
In this example, lastWeekClose will hold the value of the closing price from 5 days prior to the current day. This can be useful for comparing recent market performance against historical data.
Understanding and utilizing the DClose function can significantly enhance the analysis capabilities of a trading strategy by providing access to past market close values, which are often used as benchmarks or for technical analysis in financial markets.