I'm trying to get index of daily candle close.
I'm building an indicator which draws a horizontal line on 1 minute chart. for example since day's opening it draws line to 1440 bars forward (because 1 day has 1440 minutes) However when I change timeframe it's being broke. Is there a way to automatically spot index for close of daily candle? doesn't matter if I use 1m 5m 15m 1h 4h chart it will draw line until end of the day.