Support Resistance - Dynamic v2
Sep 11, 2020

The Support Resistance - Dynamic v2 indicator identifies significant price levels by processing pivot points through a dynamic channel-based algorithm to provide automated support and resistance zones. This tool helps traders visualize areas of institutional interest and potential price reversals by filtering pivot clusters into high-strength levels.
Usage
The Usage section describes how the script can be used to identify key market structures. The indicator automatically calculates and plots horizontal lines representing the midline of price channels where pivot points have clustered.
- Identifying Levels: When multiple pivot points fall within a specified price range (channel width), the script recognizes this as a valid support or resistance area.
- Dynamic Support & Resistance: The tool automatically colors levels based on current price action. Lines above the current price are colored as resistance (default: red), while lines below the current price are colored as support (default: green).
- Strength Filtering: Traders can use the strength settings to filter out minor levels, ensuring only zones with a minimum number of historical pivot touches are displayed.
- Visual Analysis: Labels attached to the lines show the exact price level and the percentage distance from the current closing price, aiding in risk management and target setting.
Details
The script utilizes Pine Script arrays to store and sort historical pivot points. It executes the following logic to determine S/R levels:
- Pivot Detection: It identifies Pivot Highs and Pivot Lows based on a user-defined period.
- Channel Clustering: For each pivot, the script checks how many other pivots exist within a specific price window (calculated as a percentage of the 300-period range).
- Dynamic Sorting: The identified zones are sorted by "strength" (the number of pivots within the channel). Only the top levels that meet the minimum strength requirements are displayed.
- Coordinate Updates: The script dynamically updates the positions and colors of labels and lines in real-time as the price crosses through established levels.
Settings
Setup
- Pivot Period: Determines the number of bars used to calculate pivot highs and lows (range 4-30).
- Source: Choose between "High/Low" or "Close/Open" for pivot point calculations.
- Maximum Number of Pivot: The total number of recent pivots stored in the calculation array.
- Maximum Channel Width %: Defines the vertical thickness used to group pivots into a single S/R zone.
- Maximum Number of S/R: Limits the total number of S/R lines displayed on the chart.
- Minimum Strength: The minimum number of pivot points required for a cluster to be considered a valid S/R level.
Colors
- Label Location: Offsets the labels to the right (positive) or left (negative) of the current bar.
- Line Style: Changes the visual appearance of the S/R lines (Solid, Dotted, or Dashed).
- Line Width: Adjusts the thickness of the S/R lines.
- Resistance/Support Color: Customizes the colors for levels above and below the current price.
- Show Pivot Points: Toggle to display the raw "H" (High) and "L" (Low) labels for the underlying pivots.
FAQ
How is the "Strength" of a level determined?
Strength is determined by the number of historical pivot points that fall within the same price channel. A level with a strength of 5 means five different pivots contributed to that specific zone.
Why do the lines change color from green to red?
The indicator is dynamic; it reclassifies levels based on their relationship to the current price. If the price breaks above a resistance level, that level becomes support and changes color accordingly.
How can I access Support Resistance - Dynamic v2?
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.