Ranges and Breakouts
Aug 26, 2024

The Ranges and Breakouts indicator identifies market consolidation phases and signals potential breakout opportunities by automatically detecting price ranges based on historical price action. It provides a visual framework for traders to monitor ranging periods and react when price momentum shifts outside defined boundaries.
Usage
The Usage section highlights how to interpret the range-based signals on your chart:
- Range Monitoring: The script identifies consolidation by highlighting ranges with shaded boxes. The upper half of the range is often treated as a resistance zone (bearish bias), while the lower half acts as a support zone (bullish bias).
- Breakout Identification: When price closes outside the upper or lower bounds of a detected range, the indicator signals a breakout. A bullish breakout occurs when price exceeds the range high, and a bearish breakout occurs when it drops below the range low.
- Trend Tracking: Following a breakout, the chart background or bars may change color to reflect the new trend direction.
- Take-Profit Signals: The indicator plots triangles (△ and ▽) based on Hull Moving Average (HMA) crossovers and volatility (ATR), suggesting potential exit points after a breakout move has matured.
Details
The indicator detects price ranges by tracking the highest and lowest prices over a user-defined look-back period. A range is only "confirmed" and drawn on the chart if the high and low prices remain stable for a specific number of bars (the threshold). This ensures that brief price fluctuations do not trigger false range detections.
Once a range is confirmed, the script calculates a midline and internal zones. It also identifies pivots within the range to highlight local peaks and troughs. If the "Internal Ranges" setting is disabled, the script will wait for a range to be broken before identifying a new one. If enabled, new ranges can form inside existing, larger consolidation zones.
Settings
Main Settings
- Look-back Length: Determines the number of bars used to find the highest and lowest prices for range calculation.
- Confirmation Length: The number of bars the high/low must remain unchanged before a range is officially detected. Higher values result in fewer, more significant ranges.
- Pivot Detection Length: Sets the window for identifying the aesthetic dots at local highs and lows within ranges.
Appearance
- Line Style: Choose between Solid, Dashed, or Dotted styles for the range midline.
- Allow Internal Ranges: When enabled, allows the script to plot new ranges that appear within the boundaries of a current range.
- Bullish Color: The color used for bullish zones and breakout signals.
- Bearish Color: The color used for bearish zones and breakout signals.
FAQ
How do I use the breakout signals?
Breakout signals are triggered when price closes outside the shaded range boxes. Traders often use these as entry signals for momentum trades in the direction of the breakout.
What do the small dots within the ranges mean?
The dots represent pivot highs and lows detected within the range, helping you see where price has previously reacted within the consolidation zone.
How can I access Ranges and Breakouts?
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.