Jauqius

TWP Next Bar Close Countdown

█ OVERVIEW

This script displays the time remaining for your charts current timeframe.period or a higher timeframe with the ability to create alerts that ping on the opening of the new bar that you have selected. It can be very easy to get bogged down in the charts when day trading on smaller timeframes and forgetting that it is the wave of longer timeframe traders that are setting the tone. This script was born out of this pitfall that I was noticing in my own trading.

█ CONCEPTS

The script uses a series of functions to get produce the time remaining and texts for the top and bottom rows within the table display.


█ FEATURES

1 — Resolution
  • Auto / Manual selection
    • There is tooltip explains how the automatic time selection operates (see below)
AUTO_TIMEFRAME_TOOLTIP = "When the Auto option is selected, the timeframe of the indicator is chosen automatically based on the chart timeframe. The Timeframe dropdown is ignored. The automated timeframes are: \n
 
 '10 minutes' for any chart timeframes below '1 minute' \n
 
 '1 hour' for any chart timeframes starting from '1 minute' up to '5 minutes'
 
 '4 hours' for any chart timeframes starting from '5 minutes' up to '60 minutes' \n
 
 '1 day' for any chart timeframes starting from '1 hour' up to '4 hours' \n
 
 '1 week' for any chart timeframes starting from '4 hours' up to '1 day' \n
 
 '1 month' for any timeframes starting from '1 day' up to '1 week' \n
 
 '3 months' for any timeframes starting from '1 week' up to '1 month' \n
 
 '12 months' for any timeframes above '1 month'"

2 — Text
  • Size selection
  • Color selection

3 — Display
  • Frame color selection
  • Display position selection

4 — Alerts
  • Market session selection

█ HOW TO USE

 • Add it to your chart, select your timeframe, change up your colors, and enjoy yourself

█ NOTES

 • We have no control over when realtime updates occur. A realtime bar can open, and then no realtime updates can occur until the open of the next realtime bar. The time between updates can vary considerably. For more please check out Pine's execution model and bar states.

 • As a reminder, I did make this script for myself so if you find that you are using a 2-hour alert or countdown the formatting for the words may not be succinct as they should be. We will write that loss off to my growing pine skills

█ LIMITATIONS

 • You will not be able to retrieve the time from a timeframe smaller than what is currently selected for the chart.
Skrip dilindungi
Skrip ini diterbitkan secara sumber tertutup dan anda boleh menggunakannya dengan bebas. Anda boleh menyukainya untuk menggunakannya pada carta. Anda tidak dapat melihat atau mengubah kod sumbernya.
Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?