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.
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.

