.
. .
Of course we know that it HAS to be one of those periods... but still... that's the way it is..
No, it doesn't have to be one of those timeframes. Offline charts can use non-standard timeframes, e.g., M2, M6, M20, etc. See Chart Timeframes. If the chart's timeframe is non-standard, why not just return the custom timeframe? For example, the following code:
Renders this result...

Download it and play with it and learn how to move it around...Have fun...PipPip..Jimdandy
. . .
Of course we know that it HAS to be one of those periods... but still... that's the way it is..
No, it doesn't have to be one of those timeframes. Offline charts can use non-standard timeframes, e.g., M2, M6, M20, etc. See Chart Timeframes. If the chart's timeframe is non-standard, why not just return the custom timeframe? For example, the following code:
.