OpenMonth

Category: Date and time

OpenMonth is a function in ProBuilder language that returns the month number (from 1 to 12) of the opening price of the current bar on a chart. This function is useful for analyzing data on a monthly basis, allowing traders and analysts to identify patterns or behaviors that occur in specific months.

Syntax:

OpenMonth

Example:

iMonth = OpenMonth
if iMonth = 1 then
    // Actions to perform if the opening month is January
endif

This example demonstrates how to use the OpenMonth function to check if the current bar’s opening month is January. If it is, specific actions can be defined within the if statement.

  • The function does not require any parameters.
  • It is particularly useful for seasonal analysis or when you want to execute trades based on monthly behaviors.

Understanding the use of OpenMonth can help in creating more dynamic and time-sensitive trading strategies, especially when combined with other time-based functions in ProBuilder.

Related Instructions:

  • CurrentMonth date and time
  • Month date and time
  • Logo Logo
    Loading...