OPEN-SOURCE SCRIPT

ATR Last-Bar Horizontal Stop Lines

614
This script draws ATR‑based horizontal levels only on the most recent candle, without plotting any historical lines. It uses TradingView’s line.new() engine instead of plot(), ensuring that:

Only one horizontal line per direction (Short/Long) is shown
The line is drawn only on the latest bar, never across previous bars
The line automatically updates on every new candle
Older lines are deleted instantly, avoiding chart clutter
Lines extend to the right for full visibility, but do not stretch across the entire historical chart

The script calculates ATR using the selected length and multiplier, then draws:

A Short ATR line above the current candle (High + ATR × Multiplier)
A Long ATR line below the current candle (Low − ATR × Multiplier)

Both lines can be enabled or disabled individually.
This tool is ideal for traders who want a clean chart with a single, dynamic ATR stop‑reference updated only for the current bar.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.