# Predictive Ranges

Predictive Ranges is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Predictive Ranges forecasts the market's next trading range in real time, plotting support and resistance levels that stay fixed once a bar closes (on a higher Timeframe setting, once that timeframe's bar closes) around a central tendency line whose slope doubles as a trend gauge. Once price escapes a range, fresh levels print immediately. A LuxAlgo favorite that began as a premium feature and is now open source.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jun 29, 2023.
- Access: free.
- Concepts: [ATR Bands](https://www.luxalgo.com/library/concept/atr-bands/) (primary), [S/R Zone](https://www.luxalgo.com/library/concept/s-r-zone/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn4qqz006mvhsgkh7331p7
- Page: https://www.luxalgo.com/library/indicator/predictive-ranges/

**Predictive Ranges** forecasts the trading range price is likely to respect next, projecting support and resistance levels around a central estimate of price's tendency. Its width logic rests on the same foundation as [ATR bands](https://www.luxalgo.com/library/concept/atr-bands/), an average-true-range measure scaled by a factor, but the output is a forward range that holds its ground instead of an envelope glued to price. Originally a premium feature, it was open-sourced in response to its popularity and remains one of the house's signature tools.

## How to Trade the Predictive Ranges?

- **Range extremes**: price approaching the upper or lower boundary often precedes a reversal (cues for fades, exits, or tightening stops).
- **Central level slope**: a rising central level reads as an uptrend, a falling one as a downtrend, the quickest trend check the tool offers.
- **Range breaks**: when price escapes the projected range, new levels print in real time, so the map never goes stale.
- **Stability by design**: once a bar closes, levels hold their positions until a new range is defined, which makes them dependable planning references. On the live bar they can still move, and with a higher Timeframe setting they keep updating until that timeframe's bar closes.

Raising the Factor produces broader, longer-lived ranges that are statistically less likely to be exceeded, a steadier frame for longer-term analysis.

## Predictive Ranges Settings

- **Length**: the ATR length used in the calculation; higher values generally yield ranges of consistent width.
- **Factor**: controls range width. Higher values give broader, less frequent ranges.
- **Timeframe**: generates the output from a timeframe other than the chart's.
- **Source**: the indicator's input source; matching it to the price scale keeps readings coherent.

## Frequently Asked Questions

### Do Predictive Ranges repaint?

Not once a bar closes on the chart timeframe: levels keep their positions unless a new range is defined by price breaking out, which is a large part of why traders lean on them as planning references. On the live bar they can still move. With a higher Timeframe setting, historical bars show that timeframe's final levels while live bars show developing ones until its bar closes.

### Predictive Ranges or Predictive Channels?

[Predictive Channels](https://www.luxalgo.com/library/indicator/predictive-channels/) fits sloped channels around a real-time linear trend estimate, while Predictive Ranges projects level-based ranges ahead of price. Reach for the channels when you want the trend drawn; reach for this when you want the levels.

### Why is it free?

It started as a premium LuxAlgo feature and was released open source due to community demand. Today the full build sits free in the LuxAlgo Library, where Quant, our coding agent, can pick it up from this page for testing. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Birdies](https://www.luxalgo.com/library/indicator/birdies/) (S/R Zone): markdown at https://www.luxalgo.com/library/indicator/birdies.md
- [Predictive Channels](https://www.luxalgo.com/library/indicator/predictive-channels/) (S/R Zone): markdown at https://www.luxalgo.com/library/indicator/predictive-channels.md
- [Chandelier Exit Oscillator](https://www.luxalgo.com/library/indicator/chandelier-exit-oscillator/) (ATR): markdown at https://www.luxalgo.com/library/indicator/chandelier-exit-oscillator.md
- [ATR-based Stop Distance](https://www.luxalgo.com/library/indicator/atr-based-stop-distance/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/atr-based-stop-distance.md
- [ATR Exceedance Probability Model](https://www.luxalgo.com/library/indicator/atr-exceedance-probability-model/) (ATR): markdown at https://www.luxalgo.com/library/indicator/atr-exceedance-probability-model.md
- [ATR Expansion/contraction](https://www.luxalgo.com/library/indicator/atr-expansion-contraction/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/atr-expansion-contraction.md
- [Average True Range](https://www.luxalgo.com/library/indicator/average-true-range/) (ATR): markdown at https://www.luxalgo.com/library/indicator/average-true-range.md
- [Nadaraya-Watson Envelope](https://www.luxalgo.com/library/indicator/nadaraya-watson-envelope/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/nadaraya-watson-envelope.md

---

Source: https://www.luxalgo.com/library/indicator/predictive-ranges/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
