OpenDate

Category: Date and time

OpenDate is a function in ProBuilder language that returns the date on which the current bar on the chart opened. The date is provided in the format YYYYMMDD, which stands for Year, Month, and Day. This function is particularly useful for traders and analysts who need to track the exact opening date of a price bar for historical data analysis or back-testing trading strategies.

Syntax:

OpenDate

Example:

myOpenDate = OpenDate
RETURN myOpenDate

This example defines a variable myOpenDate that stores the opening date of the current bar. It then returns this date to the indicator output window, allowing the user to see the date formatted as YYYYMMDD.

Additional Information:

  • The OpenDate function does not require any parameters.
  • It is useful in scripts where the analysis depends on the date of the bar, such as calculating how long a particular stock has been trending or identifying specific dates for further investigation.

Understanding the OpenDate function is essential for creating time-sensitive trading strategies and performing detailed market analysis.

Related Instructions:

  • Date date and time
  • Logo Logo
    Loading...