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.
Nearly identical to the price version , this configurable indicator retains the max and min value of a chart for the time duration you specify. The difference with this one is that it can be applied to any other indicator, not just price.
Applied to volume:
Someone requested a high/low price indicator that would reset the "remembered" prices daily. I started out doing just that, and then decided to make it much more configurable.
Choose the units (minutes, hours, days, weeks, months) and the number of those units, and this will reset the highest/lowest value remembered to the current values on your chosen time...