# Range Average Retest Model

The Range Average Retest Model draws swing areas between pivots and prints a setup when price recrosses each area's average, complete with take-profit and stop-loss zones scaled from 200-bar volatility. Filters for bias, spacing, and distance manage up to 165 areas at once. A visual laboratory for traders who study retest-style entries.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 7, 2024.
- Access: free.
- Concepts: [Trading Range](https://www.luxalgo.com/library/concept/trading-range/) (primary), [Retest](https://www.luxalgo.com/library/concept/retest/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn52760073vhsgp2634p5l
- Page: https://www.luxalgo.com/library/indicator/range-average-retest-model/

**Range Average Retest Model** maps the area between consecutive swing points and watches how price treats its midline. Each swing area works like a compact [trading range](https://www.luxalgo.com/library/concept/trading-range/): the model draws the average between the two swings, and when price closes back across that average it prints a setup, complete with take-profit and stop-loss zones scaled from long-term volatility, an average true range over the last 200 bars. Up to 165 swing areas can be drawn and managed at once.

## How to Trade the Range Average Retest Model?

- **Long setups**: triggered when the bar closes below the swing-area average after the prior bar closed above it.
- **Short setups**: the mirror, a close above the average following a close below it.
- **Green and red zones**: take-profit and stop-loss areas sized by user-defined multipliers on the volatility measure; each setup stays active until one side is hit.
- **Area filters**: Selection Mode restricts detection to bullish or bearish swings, and the distance bounds keep setups at sensible range from their area, the ingredients for studying asymmetric risk/reward.

The entry logic is a [retest](https://www.luxalgo.com/library/concept/retest/) of the range average: rather than chasing the swing itself, the model waits for price to come back through the midpoint. Overlapping setups are hidden by default for readability and can be enabled for the full picture.

## Range Average Retest Model Settings

- **Pivot Length**: bars used to confirm a swing point. The size and frequency of swing areas follow from it.
- **Selection Mode**: detect bullish swings, bearish swings, or both.
- **Threshold**: a volatility-based spacing rule so new areas are not detected on top of existing ones.
- **Maximum Distance / Minimum Distance**: bounds on how far from a swing area a setup may trigger.
- **Take Profit / Stop Loss**: volatility multipliers sizing the target and invalidation zones.

## Frequently Asked Questions

### What is a swing area?
A price range identified from two past swing points. The model treats the area's average as its decision line, printing setups when price recrosses it and connecting each setup to its parent area on the chart.

### Why don't I see every possible setup?
Overlapping trades are hidden by default to keep the chart readable. Enable overlapping mode in the settings for the comprehensive view, accepting denser visuals in exchange.

### How do I access it?
The model is free on the LuxAlgo Library. Load it into Quant, our coding agent, to run or backtest it without leaving this page. If retests are your focus, [Retest Break Setup](https://www.luxalgo.com/library/indicator/retest-break-setup/) approaches them from the breakout side. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Range Detector](https://www.luxalgo.com/library/indicator/range-detector/) (Trading Range): markdown at https://www.luxalgo.com/library/indicator/range-detector.md
- [Wave Consolidation](https://www.luxalgo.com/library/indicator/wave-consolidation/) (Trading Range): markdown at https://www.luxalgo.com/library/indicator/wave-consolidation.md
- [Bart Pattern](https://www.luxalgo.com/library/indicator/bart-pattern/) (Trading Range): markdown at https://www.luxalgo.com/library/indicator/bart-pattern.md
- [Range Sentiment Profile](https://www.luxalgo.com/library/indicator/range-sentiment-profile/) (Trading Range): markdown at https://www.luxalgo.com/library/indicator/range-sentiment-profile.md
- [Range Intelligence Suite](https://www.luxalgo.com/library/indicator/range-intelligence-suite/) (Trading Range): markdown at https://www.luxalgo.com/library/indicator/range-intelligence-suite.md
- [Range Breakout Signals (Intrabar)](https://www.luxalgo.com/library/indicator/range-breakout-signals-intrabar/) (Trading Range): markdown at https://www.luxalgo.com/library/indicator/range-breakout-signals-intrabar.md
- [Retest & Break Setup](https://www.luxalgo.com/library/indicator/retest-break-setup/) (Retest): markdown at https://www.luxalgo.com/library/indicator/retest-break-setup.md
- [Breakouts with Tests & Retests](https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests/) (Retest): markdown at https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests.md

---

Source: https://www.luxalgo.com/library/indicator/range-average-retest-model/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
