# Trendlines with Breaks

Draws pivot-anchored support and resistance trendlines whose slope you control (ATR-scaled by default, standard deviation or linear regression optional) and flags breakouts in real time with integrated alerts. Repainting can be disabled to lock lines in place. A clean baseline for breakout traders who trade diagonal structure without drawing it by hand.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jan 17, 2022.
- Access: free.
- Concepts: [Trendline](https://www.luxalgo.com/library/concept/trendline/) (primary), [Swing High/low](https://www.luxalgo.com/library/concept/swing-high-low/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn6pmi009hvhsgiyy0734n
- Page: https://www.luxalgo.com/library/indicator/trendlines-with-breaks/

**Trendlines with Breaks** anchors a support line and a resistance line to recent [pivot points](https://www.luxalgo.com/library/concept/swing-high-low/), extends them at a slope you control, and flags the moment price breaks through either one. It is the house baseline for automated [trendline analysis](https://www.luxalgo.com/library/concept/trendline/): three slope engines to choose from, integrated alerts on every break, and repainting that can be switched off to lock lines in place when signal precision matters more than aesthetics.

## How to Trade the Trendlines with Breaks?

- **Break of the upper trendline**: a bullish breakout cue, marked in real time and usable with any standard trendline methodology to project potential price direction.
- **Break of the lower trendline**: the bearish mirror, useful for breakdown entries or as an exit trigger.
- **Slope method shapes behavior**: ATR (the default) gives a consistent slope across lines; Stdev varies it with statistical variance; Linreg follows the regression slope.
- **Backpaint disabled**: aligns the lines with current prices instead of offsetting them into the past, the stricter view for live evaluation.

By default the trendlines are backpainted, offset back by the length specified in the settings, which reads cleanly on historical charts. Signals themselves arrive without backpainting issues, so timely decision-making stays intact.

## Trendlines with Breaks Settings

- **Length**: the pivot detection period the trendlines are built from.
- **Slope**: steepness control; values above 1 create steeper angles, while 0 turns the lines into horizontal levels.
- **Slope Calculation Method**: Average True Range, Standard Deviation, or Linear Regression.
- **Backpaint**: keep the historical offset or align lines with current data.

## Frequently Asked Questions

### Do the trendlines repaint?

Under normal settings they can, as fresh price information refines each line. Disabling that behavior locks the lines in place once drawn, trading a little adaptiveness for full stability in your trading rules.

### Is there a bigger trendline tool in the library?

Yes. The [Trendline Breakout Navigator](https://www.luxalgo.com/library/indicator/trendline-breakout-navigator/) runs long, medium, and short-term lines simultaneously and grades bars against all three. This build stays deliberately lean: one pair of lines, clear breaks, instant alerts.

### Is Trendlines with Breaks really free?

It is. The indicator sits in the free LuxAlgo Library. You can also feed it to Quant, our coding agent, from this page and backtest its breakout signals before committing them to a live plan. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Trendlines Oscillator](https://www.luxalgo.com/library/indicator/trendlines-oscillator/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendlines-oscillator.md
- [Trendline Breakout Navigator](https://www.luxalgo.com/library/indicator/trendline-breakout-navigator/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendline-breakout-navigator.md
- [Trendlines with Breaks Oscillator](https://www.luxalgo.com/library/indicator/trendlines-with-breaks-oscillator/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/trendlines-with-breaks-oscillator.md
- [Rolling Trendline](https://www.luxalgo.com/library/indicator/rolling-trendline/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/rolling-trendline.md
- [Power Hour Trendlines](https://www.luxalgo.com/library/indicator/power-hour-trendlines/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/power-hour-trendlines.md
- [Machine Learning Trendlines Cluster](https://www.luxalgo.com/library/indicator/machine-learning-trendlines-cluster/) (Trendline): markdown at https://www.luxalgo.com/library/indicator/machine-learning-trendlines-cluster.md
- [Swing Highs/Lows & Candle Patterns](https://www.luxalgo.com/library/indicator/swing-highs-lows-candle-patterns/) (Swing High/low): markdown at https://www.luxalgo.com/library/indicator/swing-highs-lows-candle-patterns.md
- [Unreached Highs/Lows Oscillator](https://www.luxalgo.com/library/indicator/unreached-highs-lows-oscillator/) (Swing High/low): markdown at https://www.luxalgo.com/library/indicator/unreached-highs-lows-oscillator.md

---

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