CurrentYear

Category: Date and time

The CurrentYear function in ProBuilder language is designed to retrieve the current year from the system’s date and time settings. This function is particularly useful for time-sensitive financial analysis where the year needs to be dynamically referenced within trading algorithms or indicators.

Syntax:

CurrentYear

Example Usage:


// Retrieve the current year
iYear = CurrentYear
RETURN iYear as "this is the current year"

This example assigns the current year to currentYear. You can then use this value in your logic for time-sensitive calculations or operations within trading algorithms that need to adjust their behavior based on the year.

Additional Information:

  • The CurrentYear function does not require any parameters.
  • It returns an integer representing the current year.
  • This function can be used in any part of a ProBuilder script where date-specific logic is necessary, such as conditional statements that depend on the year.

Understanding the CurrentYear function is essential for developing time-sensitive trading strategies and for performing annual data analysis directly within the ProBuilder environment.

Related Instructions:

  • OpenYear date and time
  • Year date and time
  • Logo Logo
    Loading...