TIME

Category: Date and time

Definition: In ProBuilder language, TIME refers to the time at which each bar on the chart is formed, expressed in a 24-hour format. This function is crucial for analyzing data points based on the time they were recorded, especially in time-sensitive trading strategies.

Syntax:

Time[N]

Here, N represents the index of the bar for which you want to retrieve the time. N can be any integer, where 0 refers to the current bar, 1 refers to the previous bar, and so on.

Example:

myTime = Time[0] / 10000

This example demonstrates how to retrieve the time of the current bar and convert it into a more human-readable format. For instance, if Time[0] returns 131500, dividing by 10000 converts it to 13.15, which can be interpreted as 13:15 or 1:15 PM.

Additional Information:

The time is provided in a compact integer format. To convert this into a standard time format (HH:MM), the value must be divided by 10000. The integer part of the result represents the hour, and the decimal part represents the minutes. This conversion is essential for readability and to facilitate time-based analysis in trading strategies.

Understanding the TIME function is fundamental for traders who rely on intraday charts where the timing of trade bars can influence decision-making.

Related Instructions:

  • CurrentTime date and time
  • OpenTime date and time
  • OpenTimestamp date and time
  • Timestamp date and time
  • Logo Logo
    Loading...