The Yesterday function in ProBuilder language is designed to retrieve the date of the day preceding the bar that is N periods before the current bar. This function is useful for analyzing historical data relative to a specific point in time in the past. The date is returned in the YYYYMMDD format, which is a standard numerical format for representing dates.
Yesterday[N]
Where N is the number of periods before the current bar. If N is 1, the function returns the date of the day just before the current bar.
Suppose you want to find the date of the day before the bar that occurred 5 days ago:
dateFiveDaysAgo = Yesterday[5]
This line of code will store the date of the day preceding the bar 5 periods before the current bar into the variable dateFiveDaysAgo.
This function does not calculate or manipulate market data but simply retrieves historical date information, making it a straightforward yet powerful tool for date-based data analysis in financial markets.