tamiotsiu

Alert Before Bar Close

 


Alert Before Bar Close
==========================
Example Figure

Originality and usefulness
This indicator/alert mechanism is unique in two ways. First, it provides alerts before the close of a candlestick, allowing time-based traders to prepare early to determine if the market is about to form a setup. Second, it introduces an observation time mechanism, enabling time-based traders to observe when the market is active, thereby avoiding too many false signals during electronic trading or when trading is light.

Detail
Regarding the settings (Arrow 1). The first input is to select the candlestick period you want to observe. The second is to notify a few seconds in advance. The third input sets the observation time. For example, if you set "1,2,3,4,5," the alert mechanism will only be activated during the period from 01:00:00 to 05:59:59, consistent with the time zone you set in TradingView. Additionally, I have set it so that the alert will only trigger once per candlestick, so don't worry about repeated alerts.

The alert setup is very simple, too. Follow the steps (Arrow 2, 3) to complete the setup. I have tested several periods and successfully received alerts on both mobile and computer. If anyone encounters any issues, feel free to let me know.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?