Dynamic Support & Resistance
Oct 14, 2024

The Dynamic Support & Resistance indicator automatically identifies and tracks key market levels using pivot points while dynamically removing them once they are breached by price action. This tool provides a real-time, clean perspective on market structure, ensuring traders focus only on currently valid supply and demand zones.
Usage
The indicator can be used to identify potential reversal points or breakout opportunities. Support lines are drawn from pivot lows, while resistance lines are drawn from pivot highs.
- Range-Bound Trading: Traders can look for long entries near active support lines and short entries near active resistance lines.
- Breakout Trading: Since the tool deletes lines upon a breach, it provides a clear visual signal of market shifts. A disappearing resistance line often indicates a bullish breakout, while a disappearing support line suggests a bearish breakdown.
- Trend Analysis: The density and positioning of remaining lines help visualize the overall trend and historical areas of price rejection.
Details
The script utilizes pivot point calculations (Pivot High and Pivot Low) over a user-defined lookback period. It leverages Pine Script v5 arrays to manage these levels efficiently. Unlike traditional pivot indicators that plot static points, this script extends lines into the future.
The core logic includes a breach detection mechanism:
- Support Breach: If the current low drops below a support level, the line is removed from the chart and the array.
- Resistance Breach: If the current high rises above a resistance level, the line is removed.
This automated management prevents chart clutter and ensures that "stale" levels do not interfere with modern price analysis.
Settings
- Pivot Length: Determines the sensitivity of the pivot detection. A higher value identifies more significant, long-term levels, while a lower value identifies more frequent, short-term levels.
- Line Width: Adjusts the visual thickness of the support and resistance lines on the chart.
FAQ
How do I access Dynamic Support & Resistance?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why do some lines disappear?
Lines are automatically deleted when price action "breaches" them (crosses through them). This ensures the chart only displays levels that have not yet been invalidated by the current market move.
Can I use this on any timeframe?
Yes, the script is scalable. By adjusting the Pivot Length, you can optimize the sensitivity for intraday scalping or daily swing trading.
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.