Smart-Limited Bar Support & Resistance + Trend Lines
May 30, 2026

The Smart-Limited Bar Support & Resistance + Trend Lines indicator automatically identifies key horizontal support/resistance levels and dynamic trend lines based on price action market structure.
Usage
The Usage section describes how the script can be used to visualize market structure. This tool focuses on tracking swing highs, swing lows, higher lows, and lower highs to determine potential breakout and reversal areas.
Dynamic Support and Resistance
The indicator monitors a user-defined lookback period to establish the highest high (resistance) and lowest low (support).
- Horizontal Levels: When a new high or low is established within the window, the levels update automatically.
- Breakout Detection: If price closes beyond these levels, the horizontal line stops extending, indicating a structural invalidation.
Trend Line Construction
The indicator draws diagonal lines based on confirmed pivot points:
- Resistance Trend Lines: Formed when a new confirmed swing high is lower than the previous one (Lower High structure).
- Support Trend Lines: Formed when a new confirmed swing low is higher than the previous one (Higher Low structure).
- Validation: The script evaluates if a trend line has already been breached during its confirmation window. Valid lines extend to the right, while breached lines are truncated and grayed out to maintain chart clarity.
Details
The indicator utilizes pivot-based market structure analysis to filter noise and identify significant turning points.
- Swing Confirmation: A swing point is confirmed after a specific number of bars (defined by Pivot Strength) have passed without a higher high or lower low.
- Slope Calculation: Trend lines are calculated using the linear slope between the two most recent valid swing points.
- Filtering: The "Minimum Bars Between Swings" logic ensures that trend lines are drawn between meaningful structural points rather than minor price fluctuations.
Settings
General Settings
- Pivot Strength: Controls the sensitivity of swing detection. Higher values result in fewer, more significant structural points, while lower values increase sensitivity to minor peaks and valleys.
- SR Lookback: The number of bars used to calculate the highest high and lowest low for horizontal support and resistance.
- Min Bars Between Swings: Filters out pivot points that are too close together to ensure the trend lines represent broader market structure.
- Show Swing Points: Toggles the visibility of red (Swing High) and green (Swing Low) markers on the chart.
FAQ
How do I adjust the indicator for scalping versus swing trading?
For scalping, decrease the Pivot Strength and SR Lookback to capture faster moves. For swing trading, increase these values to focus on major daily or weekly structural levels.
Why do some trend lines disappear or change color?
Trend lines that have been "broken" by price action during their confirmation period are automatically truncated or grayed out to show they are no longer active support or resistance zones.
How can I get access to Smart-Limited Bar Support & Resistance + Trend Lines?
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.

