Custom Previous High/Low + Breakout Alerts
Feb 25, 2025

The Custom Previous High/Low + Breakout Alerts indicator plots the previous period's high and low levels and provides automated notifications when price breaks either level. It simplifies multi-timeframe analysis by allowing users to monitor key structural levels across different time horizons simultaneously.
Usage
The Usage section describes how to interact with the levels and configure the breakout logic.
- Plotting Levels: By default, the tool displays the previous high and low for a user-selected timeframe. This is used to identify support and resistance from the immediate prior candle of the chosen period (e.g., Daily, 4-Hour).
- Breakout Detection: You can choose between two detection methods:
- Instant: Alerts fire immediately as price touches or crosses the level.
- Wait for Close: Alerts fire only after a candle from a specific "Close Timeframe" closes beyond the level, filtering out minor wicks.
- Multi-Timeframe Monitoring: You can enable up to three additional timeframes for alerts only. While these won't plot lines to keep the chart clean, the indicator will track them in the background and notify you of breaks.
Details
The script uses request.security to fetch historical data from higher timeframes. To ensure accuracy and prevent "alert spam," the logic is designed to trigger only once per period for each level. If price hovers around a high or low, you will not receive duplicate alerts until a new period begins. The indicator also includes a custom getReadableTimeframe function to provide clear, human-readable text in alert messages, such as "1 hour" instead of "60".
Settings
General Settings
- Timeframe for High/Low: The primary timeframe used for both plotting lines and triggering alerts.
- Line Offset: Moves the end of the lines forward by a specific number of bars for better visibility.
- Breakout Detection: Selects between "Instant" or "Wait for Close" logic.
- Close Timeframe: If "Wait for Close" is selected, this determines the candle timeframe that must close past the level.
- Enable Alerts For TF1-TF3: Allows tracking of additional timeframes for background alerting.
High/Low Lines
- Show Previous High/Low Lines: Toggles the visibility of the primary levels.
- High/Low Color/Width/Style: Customizes the visual appearance of the resistance and support lines.
Labels
- Show Labels: Toggles text labels next to the levels.
- Text/Color: Customizes the naming convention (e.g., "Prev High" or "PH") and label colors.
FAQ
How do I set up a breakout alert? To set up an alert, use the TradingView Alert dialog (ALT+A), select "Custom Previous High/Low + Breakout Alerts" as the condition, and choose the "Any alert() function call" option.
Can I monitor more than one timeframe at once? Yes, you can enable up to three additional timeframes in the settings to receive alerts for their respective highs and lows without cluttering your chart with lines.
How do I get access to Custom Previous High/Low + Breakout Alerts? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

