# Breakouts with Tests & Retests

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

Breakouts with Tests & Retests builds areas of interest from swing points and labels every interaction: solid triangles for tests, color flips on breakouts, hollow triangles for retests. All judged on closes, not wicks. Adjustable area width and swing sensitivity control exactly how many interactions qualify.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 30, 2024.
- Access: free.
- Concepts: [Breakout](https://www.luxalgo.com/library/concept/breakout/) (primary), [Retest](https://www.luxalgo.com/library/concept/retest/), [Level Interaction Rules](https://www.luxalgo.com/library/concept/level-interaction-rules/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn0l5m000svhsgz8pmb0po
- Page: https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests/

**Breakouts with Tests & Retests** turns swing points into areas of interest and then narrates every interaction: price testing the area, [breaking out](https://www.luxalgo.com/library/concept/breakout/) through it, or returning to [retest](https://www.luxalgo.com/library/concept/retest/) it from the other side. Bullish swing areas draw in green, bearish in red, and every judgment runs on opens and closes (wicks are deliberately ignored), so labels reflect committed movement rather than probes.

## How to Trade the Breakouts with Tests & Retests?

- **Test (solid triangle)**: a bar opens inside the area and closes beyond it in the direction of the swing's bias. The level is doing its job.
- **Breakout (color flip)**: a close through the area against its bias changes the zone's color, flagging the break the moment it completes.
- **Retest (hollow triangle)**: after a breakout, a bar opening inside the area and closing outside in the breakout's direction confirms the flip, the classic continuation cue.

Width drives behavior: a higher Width lets price consolidate inside the area for longer, which tends to produce more test indications, while a longer-lived area offers more retest chances. Display options isolate bullish or bearish patterns when you only want one side of the market.

## Breakouts with Tests & Retests Settings

- **Display**: both pattern types together, exclusively bullish or bearish, or Bullish OR Bearish, which tracks one side at a time.
- **Width** (default 1): scales the width of each swing area as a multiple of the 200-bar ATR.
- **Maximum Bars** (default 500): how far an area may extend from its start, or from the breakout bar once it has flipped, before it stops extending, whether or not it was tested.
- **Display Test/Retest Labels** and **Minimum Bars**: show every label (Minimum Bars sets the gap between them), or only the latest one.
- **Set Back To Last Retest**: pulls an expired area's right edge back to its last test or retest label.
- **Swings**: the Left and Right bar counts (defaults 10 and 1) a swing high or low must dominate, plus colors under Style and a separate Label Size setting.

## Frequently Asked Questions

### What separates a test from a retest?

A test happens while the area still holds its original bias: open inside, close out in the swing's direction. A retest comes after a breakout and confirms the level's new role from the other side. It is the same break-then-confirm sequence the [Retest Break Setup](https://www.luxalgo.com/library/indicator/retest-break-setup/) build trades as a dedicated model.

### Why do the labels ignore wicks?

Because the logic keys on where bars open and close, a wick spiking through an area never triggers anything by itself. That filters the noisiest interactions out of the record, with the trade-off that confirmation always waits for the close.

### Is Breakouts with Tests & Retests free?

Yes. Grab it from this page in the LuxAlgo Library, no plan required, and put it through its paces in Quant, our coding agent, without leaving the page. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Breakout Detector (Previous MTF High Low Levels)](https://www.luxalgo.com/library/indicator/breakout-detector-previous-mtf-high-low-levels/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/breakout-detector-previous-mtf-high-low-levels.md
- [Candle Breakout Oscillator](https://www.luxalgo.com/library/indicator/candle-breakout-oscillator/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/candle-breakout-oscillator.md
- [Luminance Breakout Engine](https://www.luxalgo.com/library/indicator/luminance-breakout-engine/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/luminance-breakout-engine.md
- [Probabilistic Breakout Forecaster](https://www.luxalgo.com/library/indicator/probabilistic-breakout-forecaster/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/probabilistic-breakout-forecaster.md
- [Gap Fill Breakouts](https://www.luxalgo.com/library/indicator/gap-fill-breakouts/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/gap-fill-breakouts.md
- [Trendline Breakout Navigator](https://www.luxalgo.com/library/indicator/trendline-breakout-navigator/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/trendline-breakout-navigator.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
- [Range Average Retest Model](https://www.luxalgo.com/library/indicator/range-average-retest-model/) (Retest): markdown at https://www.luxalgo.com/library/indicator/range-average-retest-model.md

---

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