Support and Resistance Logistic Regression

May 29, 2025

Static chart image
Support and Resistance
Machine Learning

The Support and Resistance Logistic Regression indicator leverages advanced statistical modeling to identify and project key price levels where the market is likely to find support or resistance. By moving beyond simple historical highs and lows, this tool evaluates the probability of a level's future efficacy based on underlying market conditions at the time of formation.

Usage

The script identifies potential support and resistance zones using pivot points and then applies a logistic regression model to filter for the most significant levels.

  • Intelligent Identification: Support and resistance levels are plotted automatically based on statistical significance rather than just price extremes.
  • Predictive Probability: Each level can display a probability label (0-100%), representing the model's confidence that the level will act as true support or resistance based on its learned data.
  • Retest & Break Labels: The chart displays "R" labels when price successfully tests a level and "B" labels when a level is decisively broken. This helps traders visualize the strength and lifecycle of specific zones.
  • Dynamic Visuals: Users can customize the line style, width, and colors to differentiate between support and resistance zones.

Details

The core of the indicator lies in its logistic regression model, which is trained on-the-fly as new data arrives. The process follows these steps:

  1. Pivot Detection: It finds significant highs and lows based on the "Pivot Length" setting.
  2. Feature Extraction: For every pivot, the script extracts the Relative Strength Index (RSI) and the candle body size. These act as the primary inputs for the statistical model.
  3. Model Training: The model analyzes whether past pivots were "respected" (price bounced off them) or "broken." It learns the relationship between the input features and the likelihood of a pivot becoming a durable S/R level.
  4. Probability Calculation: When a new pivot forms, the model assigns it a probability score. If this score exceeds the "Probability Threshold," the level is rendered on the chart.

Settings

General Configuration

  • Pivot Length: Defines the number of bars used to detect significant highs and lows.
  • Target Respects: Specifies how many times a level must be touched and respected by price to be considered "strong" by the model's training logic.
  • Probability Threshold: The minimum confidence score (0 to 1) required for a level to be drawn on the chart.
  • Hide Far Lines: When enabled, the script removes levels that are significantly far from the current market price to keep the chart clean.

Style

  • Show Prediction Labels: Toggles the percentage labels showing the model's confidence for each level.
  • Show Retests: Toggles the visibility of "R" (Retest) labels.
  • Show Breaks: Toggles the visibility of "B" (Break) labels.
  • Line Style & Width: Customizes the visual appearance of the S/R lines.
  • Support/Resistance Color: Allows for custom color selection for both types of levels.

FAQ

How do I access Support and Resistance Logistic Regression?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What do the "R" and "B" labels mean?

"R" stands for Retest, indicating price touched the level and bounced. "B" stands for Break, indicating price has closed through the level, suggesting it may no longer be active.

Why are some pivots not showing lines?

If a pivot's calculated probability is lower than your "Probability Threshold" setting, the indicator will not plot it. Lowering this threshold will show more levels, while increasing it will show only the highest-probability zones.

Free access on the following platforms
tradingviewSymbolTradingView
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

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.