All indicators

Auto Support / Resistance Levels

May 2, 2020

Static chart image
Support and ResistancePivot Based (Retrospective)

The Auto Support / Resistance Levels indicator automatically identifies and plots horizontal support and resistance levels based on multi-timeframe pivot points to help traders visualize key market structure.

Usage

The tool can be used to identify potential breakout or reversal zones by plotting three distinct tiers of support and resistance. Each tier represents a different lookback period, allowing for the identification of short-term, medium-term, and long-term price floors and ceilings.

  • Resistance Levels (Red): These lines indicate price peaks where selling pressure has historically emerged.
  • Support Levels (Green): These lines indicate price troughs where buying interest has historically appeared.

Traders often use these levels to set stop-loss orders, take-profit targets, or to confirm trade entries when price interacts with a specific tier.

Details

The script utilizes the ta.pivothigh and ta.pivotlow functions to detect significant price turning points. By default, it tracks three separate levels simultaneously:

  1. Level 1 (Thin Line): Uses the shortest lookback period for reactive, short-term levels.
  2. Level 2 (Medium Line): Uses a moderate lookback period for intermediate structure.
  3. Level 3 (Thick Line): Uses the longest lookback period to highlight major historical turning points.

The levels are extended horizontally across the chart using the trackprice parameter, ensuring the most recent valid pivot remains visible for current price action analysis.

Settings

  • # of Candles to Look Back 1: Sets the left and right strength for the first (short-term) pivot detection.
  • # of Candles to Look Back 2: Sets the left and right strength for the second (medium-term) pivot detection.
  • # of Candles to Look Back 3: Sets the left and right strength for the third (long-term) pivot detection.

FAQ

How do I use the different line thicknesses?

The line thickness indicates the strength of the lookback period. The thinnest line represents the shortest lookback (reactive), while the thickest line represents the longest lookback (significant structural levels).

Can I set alerts for these levels?

Yes, the script includes built-in alert conditions for price crossing over or under any of the six calculated support and resistance levels.

How can I access Auto Support / Resistance Levels?

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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.