Moving Regression Band Breakout strategy
Feb 19, 2021

The Moving Regression Band Breakout strategy indicator provides a systematic approach to trading channel breakouts using advanced polynomial regression. It aims to capture trending movements by identifying when price action deviates significantly from its predicted mean, while offering flexible exit mechanisms to protect capital.
Usage
The strategy is primarily used to identify trend initiation through band breakouts. Examples of its application include:
- Long Entries: A long position is triggered when a candle closes above the upper band. Users can optionally filter these entries to only occur when the slope of the Moving Regression curve is positive to ensure trend alignment.
- Short Entries: A short position is initiated when a candle closes below the lower band. Similar to long entries, a negative slope filter can be applied for added confirmation.
- Exit Logic: The strategy provides three distinct support/resistance levels for exiting positions: the central line, the opposite band, or the opposite band adjusted by a 14-period ATR.
- Risk Management: A dynamic stop loss is implemented at the chosen support/resistance line. If the support line moves above the entry price for a long (or below for a short), the stop loss automatically shifts to breakeven to lock in protection.
Details
The script is built upon Moving Regression Prediction Bands, which utilize Local Polynomial Regression to model price action. Unlike standard linear regressions, this model adapts to local curvature, providing a smoother and more responsive baseline. The "Prediction" aspect comes from calculating the expected value for the next period, which serves as the central axis for the bands. The bands themselves are constructed by applying a multiplier to the Mean Absolute Error (MAE) of the regression model, creating a volatility-adjusted channel.
Settings
Model Parameters
- Source: The price data used for the regression calculation (default is Close).
- Local Polynomial Degree: Defines the order of the polynomial; higher degrees allow the model to follow complex price movements more closely but may increase noise.
- Length: The lookback window for the regression calculation.
- Multiplier: Adjusts the width of the bands based on the model's error.
Strategy Conditions
- Allow Long/Short Entries: Toggles for enabling specific trade directions.
- Exit Long/Short At: Dropdown menu to select the exit trigger (Lower/Upper Band, ATR-adjusted Band, or Central Line).
- Enter Only When MR Slope is Positive/Negative: A trend filter that requires the regression line to be pointing in the direction of the trade.
Visuals & Backtesting
- Fixed Backtest Period: Allows users to define specific start and end dates for historical performance analysis.
- Show Stop-Loss Line: Visualizes the current active stop-loss level on the chart.
- Show Breakout Signals Labels: Displays icons on the chart when entry conditions are met.
FAQ
- How do I interpret the central line? The central line represents the previous period's prediction for the current price. When the price is significantly above or below this while breaking the bands, it indicates a momentum shift.
- What is the benefit of the Polynomial Degree setting? A degree of 0 acts like a simple moving average, while a degree of 2 or higher allows the indicator to "bend" with the price, reducing lag during trend reversals.
- How can I access Moving Regression Band Breakout strategy? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

