The Second function in ProBuilder language is used to retrieve the number of seconds past the minute for the timestamp of the current candlestick in a trading chart. This function is particularly useful for strategies that require precise timing down to the second, such as high-frequency trading algorithms.
Second
mySecond = Second
RETURN mySecond
This example defines a variable mySecond which stores the number of seconds past the minute of the current candlestick’s timestamp. It then returns this value to the indicator window, which can be useful for debugging or logging in a trading strategy.
For beginners, it’s important to note that the precision of the Second function’s output depends on the granularity of the chart being used. For instance, on a daily chart, the second will always be zero since the candle represents an entire day.