OPEN-SOURCE SCRIPT

Chart Timeframe Detection - Function

Chart Timeframe Detection - Function

A small and effective function to detect the current chart timeframe in minutes.
It can be used to further detect a specific chart timeframe (a daily timeframe or even a 16h39m timeframe).

The result is returned as integer.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.