TradingView
SamRecio
3 Feb 2023 pukul 04.14

HTF Bar Close Countdown 

E-mini S&P 500 FuturesCME

Huraian

This simple indicator displays a countdown for the amount of time left until a bar of your chosen timeframe closes.
Displays up to 5 different HTF countdowns.
Fully Customizable to fit any style, change the text colors, background colors, frame colors, display size and border & frame widths.
Flat display option for a sleek look to mesh with your charts.

Notes/Tips:
  • Higher Time Frames only! This is only intended to view HTF countdowns, will not work when trying to use a timeframe lower than your current chart's.
  • Some weird timeframes do not work, you'll know when.
  • Only works on live charts! Will display "Closed" when on an inactive chart.
  • Does not work for replay! A countdown is pretty pointless on a replay that is not real-time anyways...


Enjoy!
Komen
crypteisfuture
you are a wizard!
shonofear
great script, clean. just wondering (no idea if possible) if you can somehow add some padding to the table so that theres no movement except for the numbers counting down.
Currently since some numbers are wider it moves around and distracts a little :P
I had a little play with your code to try align text to right for the countdown numbers which sets it more in place but then the TF column moves... not sure if can add a few spaces (padding) which in theory would correct?
cheers
SamRecio
@shonofear, I'm already using formatting to keep it displaying 2 numbers wide at all times, on my end I am unable to replicate your issue.
It is likely due to your system font, if you're noticing wider and narrower numbers.
shonofear
@SamRecio, thanks for the reply. okay I will look into it on my end.
cryptorecap2021
this indicator is actually very important.
Trader_Karl
Love your indicator and was wondering if you could add an alert function to it.
Or give me an idea how I might be able to modify your script on my own to accomplish this?
I trade mostly on the 15m TF and would like to get an alert every 15m, when a candle closes and a new one opens.
Thank you for this indicator and keep up the good work!
SamRecio
@Trader_Karl, add an alert with a Greater-Than 0 Condition to fire "once per bar" or "on bar close" set the alert on whichever chart timeframe you need a new candle alert for.
Since the condition will always be true, and the alert will only fire once per bar, it will fire right at the beginning of the bar and wait til a new bar to fire another.
Trader_Karl
@SamRecio, Wonderful! Thank you so very much for all of your patience and help.
In-Chart
Why does it often show the wrong time? For example, on the five minutes it sometimes says that they are missing -01:23:49:43

Am I the one setting it wrong?
SamRecio
@Work_Out, you're probably on a high timeframe trying to look at a lower timeframe countdown.
This indicator only works on higher timeframes. If you current chart is on a higher timeframe than the indicator is tracking, then you will see errors occur.
This is why its called "HTF Bar Close Countdown" and not just "Bar Close Countdown".
Lebih