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.
受保護腳本
該腳本是閉源發佈的,您可以自由使用。您可以把它加入到常用以在圖表上使用它。您無法查看或修改其原始碼。
免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?