Breakout line
Jul 25, 2019

The Breakout line indicator provides a dynamic pivot level based on higher timeframe data to help traders identify potential breakout and breakdown zones. It serves as a simplified reference point for trend continuation or reversal by calculating the midpoint of the previous period's price action.
Usage
The indicator is primarily used to identify support and resistance levels derived from higher timeframes. When price trades above the calculated line, it can signal a bullish bias or a breakout scenario. Conversely, when price trades below the line, it can indicate a bearish bias or a breakdown.
Users can look for:
- Bullish Breakouts: A price cross above the breakout level on the current chart timeframe.
- Bearish Breakdowns: A price cross below the breakout level on the current chart timeframe.
Details
The script functions by fetching the previous candle's open and close prices from a user-defined higher timeframe (HTF) using the request.security function. It then calculates the arithmetic mean of these two values to plot a single "Breakout" line on the chart. This method emphasizes the "body" of the previous higher timeframe candle, representing the core value area of that period rather than the extremes (high/low).
Settings
- Close Time Frame: Determines the higher timeframe from which the open and close data is retrieved. This must be set to a timeframe higher than the current chart for meaningful results (e.g., Daily timeframe data while viewing a 1-hour chart).
FAQ
How do I use the Breakout line for alerts?
The indicator includes built-in alert conditions that trigger when the price crosses over or under the breakout level. You can set these up via the TradingView alerts menu.
Why is the line horizontal?
The line remains horizontal for the duration of the selected "Close Time Frame" because it is based on the completed data of the previous period. It only shifts when a new candle closes on the higher timeframe.
How can I access this script?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.