The Minute function in ProBuilder language is used to retrieve the minute component of the timestamp for each bar on the chart. This function is particularly useful for analyzing data in intraday timeframes, where the minute-by-minute movement is significant.
Minute
To determine the timeframe of the current chart, you can calculate the difference in minutes between consecutive bars. This example also includes a condition to check if the current bar falls in the last half-hour of an hour.
tf = (Minute - Minute[1])
if tf < 0 then
tf = 60 - abs(tf)
endif
// Check if we are in the last half-hour of the hour
if(Minute > 30) THEN
HalfHour = 1
ELSE
HalfHour = 0
ENDIF
RETURN HalfHour
This function is essential for strategies that require precise timing within the hour, such as assessing volatility or trading activity increases during specific periods of the trading session.