CurrentMonth is a function in ProBuilder language that returns the current month as a numerical value. This function is particularly useful for creating time-specific conditions within trading algorithms or scripts.
CurrentMonth
The following example demonstrates how to use the CurrentMonth function to check if the current month is October. If it is, a variable HalloweenMonth is set to 1, otherwise, it is set to 0.
IF (CurrentMonth = 10) THEN
HalloweenMonth = 1
ELSE
HalloweenMonth = 0
ENDIF
RETURN HalloweenMonth
This function does not require any parameters and can be used directly in any part of the ProBuilder script where a month-based condition is needed.