OPEN-SOURCE SCRIPT
Aggiornato

Swing Low Stop Loss Levels

4 208
Swing Low Stop Loss Levels plots volatility-adjusted stop loss levels below the most recent confirmed swing lows, so you can see at a glance where a structure-based stop for a long position would sit.

HOW IT WORKS

A swing low is a candle whose low is lower than the lows of the N candles on each side of it. Once a swing low is confirmed, the indicator draws a line below it at:

Stop level = Swing low − (ATR × multiplier)

The ATR value is taken from the swing low candle itself, so each level is fixed at the moment it forms and does not drift as volatility changes afterward. Each line starts at its swing low, runs to the current candle, and is labeled with its price.

The indicator keeps only the most recent swing lows (3 by default). When a new swing low is confirmed, the oldest level is removed.

SETTINGS

Swing detection
- N (candles on each side): how many candles on both sides must have higher lows. Higher values find more significant swings; lower values find more frequent, minor swings.
- Number of swing lows to show: how many recent stop levels are displayed.

ATR buffer
- ATR length: the ATR calculation period (default 14).
- ATR multiplier: how far below the swing low the stop is placed, in ATR units (default 0.25).

Style
- Line color, line style (Solid, Dashed, Dotted), and line width.
- Show price labels: displays the stop price next to each line.
- Remove a level once price closes below it: optionally clears levels that have already been broken, since a violated swing low is usually no longer a valid stop reference.

HOW TO USE IT

When planning a long entry, the nearest level below price gives a stop that sits beneath recent market structure with a small volatility buffer, which helps avoid being stopped out by normal noise right at the swing low. Deeper levels show alternative stops if you prefer more room. The distance between entry and stop can also be used for position sizing.

NOTES

- A swing low can only be confirmed after N candles have closed to its right, so each level appears N candles after the actual low. This is inherent to swing detection and means the indicator does not repaint.
- The indicator is designed for long positions (stops below swing lows).
- It works on any symbol and timeframe.

This tool is for chart analysis only and does not provide trading signals or guarantee results. Always apply your own risk management.
Note di rilascio
Update: swing lows now confirm only on candle close (no repainting)
Note di rilascio
Change the default number of stop losses to 1

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.