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.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.