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.
CurrentYear
// 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.
Understanding the CurrentYear function is essential for developing time-sensitive trading strategies and for performing annual data analysis directly within the ProBuilder environment.