OPEN-SOURCE SCRIPT

MJ Automatic Support and Resistance

269
MJ Automatic Support & Resistance

MJ Automatic Support & Resistance is a chart-based indicator designed to automatically identify and display key support and resistance levels using confirmed pivot highs and pivot lows.

The indicator recalculates based on the active chart timeframe, so the levels automatically update when switching between intraday, daily, or higher timeframes.

Key Features

. Automatically detects support and resistance levels
. Works across all chart timeframes
. Uses confirmed pivot highs and lows
. Separate color controls for support and resistance
. Separate line-thickness controls for support and resistance
. Adjustable pivot sensitivity
. Optional merging of nearby levels
. Adjustable maximum number of displayed levels
. Minimum-touch filter for stronger levels
. Solid, dashed, and dotted line options
. Adjustable line transparency
. Optional price labels
. Optional removal of broken levels
. Adjustable ATR-based breakout confirmation buffer
. Ability to show or hide support and resistance independently

How It Works

Resistance levels are created from confirmed pivot highs, while support levels are created from confirmed pivot lows.

When multiple pivots form near the same price, the indicator can merge them into one level using an ATR-based distance filter. The level price is then averaged as additional touches are detected.

Users can also require a minimum number of touches before a level becomes visible, helping reduce weaker or less-tested levels.

Important Note

Pivot-based levels require future candles to confirm. Because of this, a new support or resistance level will appear only after the selected pivot-strength period has passed.

A higher Pivot Strength generally produces fewer but stronger levels. A lower Pivot Strength produces more levels and reacts faster to short-term price structure.

Suggested Settings

For a balanced chart:

Pivot Strength: 5
Maximum Levels: 30–50
Merge Nearby Levels: Enabled
Merge Distance: 0.20 ATR
Minimum Touches: 1–2
Support Thickness: 2
Resistance Thickness: 2

Lower pivot-strength settings may be more suitable for short-term trading, while higher settings may be better suited for swing trading and higher-timeframe analysis.

Disclaimer

This indicator is intended for technical analysis and educational purposes only. Support and resistance levels are not guaranteed to hold. Traders should combine the indicator with proper risk management, price action, volume, market structure, and other forms of confirmation before making trading decisions

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.