All indicators

Automatic Support & Resistance

Jul 14, 2019

Static chart image
Support and ResistancePivot Based (Retrospective)

The Automatic Support & Resistance indicator automatically detects and projects significant support and resistance levels by identifying major price swings and pivots in historical price action.

Usage

The indicator can be used to identify potential reversal or breakout zones based on historical price significance. By default, the tool highlights the most recent significant swing highs and lows, which represent areas where concentrated buying or selling pressure previously entered the market.

Traders can use these levels to:

  • Identify potential targets for take-profits.
  • Determine areas for stop-loss placement.
  • Anticipate price reactions at key historical levels.

The levels are color-coded based on the current price relative to the level, helping to visually distinguish between active support (price above the level) and resistance (price below the level).

Details

The script utilizes the ta.pivothigh() and ta.pivotlow() functions to find structural "peaks" and "valleys." It tracks multiple tiers of levels:

  • Quick Levels: Based on a shorter lookback window (Quick Right), capturing more immediate market structure.
  • Significant Levels: Based on a longer lookback window (Right Bars), capturing more established historical pivots.

The indicator plots the last three significant swing highs and the last three significant swing lows, alongside the most recent "quick" pivots, providing a total of eight dynamic horizontal levels.

Settings

  • Left Bars: The number of bars to the left required to confirm a pivot point.
  • Right Bars: The number of bars to the right required to confirm a major pivot point.
  • Quick Right: The number of bars to the right required to confirm a "quick" or minor pivot point.
  • Source: Determines whether the pivot calculation uses the "Close" price or the "High/Low" of the bars.

FAQ

How do I use the levels for trading?

Levels act as historical areas of interest. If price approaches a level from below, it may act as resistance; if price is above a level, it may act as support.

What do the different colors mean?

The levels change color based on the current price. Typically, levels below the current price are colored to represent support, while levels above the current price represent resistance.

How can I access the Automatic Support & Resistance 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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

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