Clarification: There are two ways of displaying higher timeframe candles, by programmatically calculating it based on current timeframe, or by using request.security.
- Programmatically calculating provides real time update, however it does not work well for partials. for example, when the chart is on 3m, it fails to calculate 5m correctly. instead, it will calculate 6m. that is because the minimum of candles needed to calculate 5m will be two 3m candles.
- request.security is the preferred approach, however it is extremely slow and would not show live updated candles and that will result with price updating few seconds later, which would render this indicator useless
The approach I have taken is that if selected timeframe cannot be calculated based on the chart timeframe, then the timeframe will be hidden/ignored
Known bug: Monday on daily will be off because lower timeframe calculation includes Sunday, where on daily timeframe it is ignored