All indicators

Segmented Regression Breakout + TP/SL

Feb 27, 2026

Static chart image
SignalsChannelsMoney Management

The Segmented Regression Breakout + TP/SL indicator is a momentum trading tool that identifies price breakouts from dynamic linear regression channels and automatically projects risk management levels. It utilizes statistical modeling to establish local equilibrium zones, reacting to violations of the market structure rather than simple price ranges.

Usage

The indicator builds a channel based on linear regression that evolves with the price. Once the segment reaches a user-defined minimum length, the channel parameters "freeze" to prevent repainting and establish a stable breakout boundary.

  • Long Entry: A breakout occurs when the price closes above the upper boundary of the regression channel (indicated by green triangles).
  • Short Entry: A breakout occurs when the price closes below the lower boundary of the regression channel (indicated by red triangles).

After a confirmed breakout, the tool automatically plots the entry price, a Stop Loss level, and up to three Take Profit targets based on risk-to-reward ratios. Only one active trade is tracked at a time; targets remain locked until the price hits either the SL or the final TP.

Details

Unlike traditional consolidation breakouts that use high/low price ranges, this tool models price behavior using the slope, intercept, and standard deviation of residuals. The "Segmented" nature refers to how the indicator resets its calculation after each breakout, starting a new regression segment. The "Freezing" mechanism is crucial for stability; it ensures that the boundaries used for the breakout trigger do not shift as new data arrives, allowing for a consistent evaluation of regime changes.

Settings

Channel Settings

  • Deviation Multiplier: Adjusts the width of the channel boundaries based on standard deviation.
  • Minimum/Maximum Channel Length: Controls the segment size before freezing and the maximum extent it can reach.
  • Gradient Steps: Determines the visual smoothness of the channel filling.
  • Bull/Bear Channel Color: Customizes the colors for upward and downward sloping channels.

TP/SL Settings

  • Show TP/SL: Toggles the visibility of all target and stop levels.
  • SL Calculation Mode: Choose between ATR-based (Average True Range) or a fixed percentage from the entry price.
  • ATR Period/Multiplier: Configures the sensitivity of the ATR-based Stop Loss.
  • TP RR Ratios: Set specific Risk-to-Reward ratios for three independent Take Profit levels.

Display

  • Visibility Toggles: Independent checkboxes to show or hide the SL and individual TP levels (1, 2, and 3).

FAQ

How do I interpret the channel colors? The channel color reflects the slope of the regression line. A bearish color (default red) indicates an increasing slope, while a bullish color (default green) indicates a decreasing slope. Note that a breakout can occur in either direction regardless of the channel's current slope.

Can I use this on any timeframe? Yes, the indicator is designed to work on all timeframes and asset classes, including stocks, forex, and cryptocurrency. It is recommended to optimize the length and deviation settings for the specific volatility of the asset being traded.

How do I access Segmented Regression Breakout + TP/SL? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.