TradingView
standingtiger
Jun 2, 2022 11:16 PM

Time Functions 

E-mini S&P 500 FuturesCME

Description

Library "TimeFunctions"
Utility functions to handle time in Pine Script

TimeframetoInt()
Returns an int that corresponds to a timeframe string:
"1" => 1
"5" => 5
"10" => 10
"15" => 15
"30" => 30
"60" => 60
"H1" => 60
"H4" => 240
"1D" => 1440

BarsSinceOpen()
Returns the number of bars that have passed since the opening of the New York Session.
More