Support and Resistance Levels
Mar 12, 2021

The Support and Resistance Levels indicator automatically identifies and plots key price floor and ceiling levels based on historical peaks and troughs to assist in technical analysis.
Usage
The indicator can be used by both reversal and trend-following traders to identify potential areas of interest on the chart.
- Reversal Trading: Traders may look for short opportunities when price approaches a resistance level (green crosses) or long opportunities when price approaches a support level (red crosses).
- Trend Trading: Traders may monitor for breakouts above resistance levels or breakdowns below support levels to confirm momentum and potential trend continuations.
The output is displayed as horizontal cross markers. Resistance levels are extended from recent price peaks, while support levels are extended from recent price troughs.
Details
The script identifies support and resistance by looking for new highs or lows within a specific lookback period.
- Resistance: Formed when the current high is higher than the highest high of the previous n periods.
- Support: Formed when the current low is lower than the lowest low of the previous n periods.
Once a new level is established, the indicator maintains that price value until a newer peak or trough is detected. This creates a continuous reference point for supply and demand zones.
Settings
- Length: This setting controls the lookback period used to identify levels. A higher value results in fewer, more significant levels, while a lower value identifies more frequent, minor price fluctuations. Values between 10 and 20 are generally recommended for standard analysis.
FAQ
How do I use the Support and Resistance Levels tool?
You can use it to identify price zones where the market has historically reversed or stalled, helping you set entries, stop-losses, or take-profit targets.
What does the Length setting change?
The Length determines the sensitivity of the indicator. Increasing the length filters out market noise to show major structural levels, while decreasing it highlights short-term intraday levels.
How can I access this indicator?
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.