OPEN-SOURCE SCRIPT
Updated

Custom Previous High/Low + Breakout Alerts

508
This indicator plots the previous high and low of the selected timeframe and alerts you when the price breaks either level.
To prevent spam, it triggers only once per period. If both the high and low break within the same period, you will receive an alert for each, but no duplicates if price hovers around these levels.


How to Set Up Alerts
1. Choose Your Timeframe
- In the indicator settings, select the timeframe for the high/low reference.
- Example: If you select 1 hour, the indicator will plot the previous 1-hour high and low and alert you when either level is broken

2. Create an Alert
- Condition → High/Low Break Alerts
- Function → Any alert() function call

Optional:
- If you want alerts only for high breakouts or low breakouts, select High Breakout or Low Breakout and use "Once Per Bar" as the trigger. (It will still alert only once per period.)

3. Setting Alerts for Multiple Timeframes
- If you want to create another alert for a different timeframe, first select the new timeframe in the indicator settings, then create a new alert
- Note: Previous alerts will continue to notify you based on the timeframe they were originally set for, even if you change the timeframe in the indicator settings.
Release Notes
Fixed a bug where the high/low was not displayed on certain timeframes for Futures Contracts

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.