OPEN-SOURCE SCRIPT
업데이트됨 ATR Stop Loss Non-Decreasing & Line

The script calculates a custom stop-loss level based on the Average True Range (ATR) indicator, ensuring that this stop-loss level never decreases from one bar to the next unless a reset condition is met. It also visually displays the ATR value and the calculated stop-loss level as a line on the chart.
릴리즈 노트
This indicator implements an adaptive ATR-based stop loss and take profit system designed for flexible trade management directly on the chart. It calculates trailing stop levels using the Average True Range (ATR), a volatility measure which helps dynamically adjust stop distances to current market conditions.Key features:
ATR Calculation: Uses user-configurable ATR period and multiplier inputs to scale stop levels.
Flexible Trailing Modes: Offers two modes for managing the stop levels:
Non-Decreasing mode for the low level, which ensures the trailing stop only moves upward or stays flat to lock in gains.
Non-Increasing mode for the high level, ensuring the stop only moves downward or stays flat.
Dynamic Reset: Resets trailing stops if price closes beyond the current trail, allowing adaptation to new price action.
Visual Clarity: Plots trailing stop levels on the price chart with clear color coding (red for low stops, yellow for high stops) and draws corresponding stop lines for visual monitoring.
Overlay and Status Visualization: The ATR value is shown in the status line for quick reference.
How it works:
The script calculates candidate stop levels by adding/subtracting a multiple of ATR from current highs and lows. Depending on the selected mode, the trailing stops either lock in favorable price movement or reset when surpassed by price, making it suitable for trend-following or range-bound trading styles. This method leverages market volatility to automatically adjust stops, helping traders protect profits and manage risk more effectively than static stops.
Use cases:
Traders seeking automated volatility-based stop loss and take profit zones.
Those who want a stop system that adapts to changing market conditions.
Users preferring configurable trailing modes for custom behavior.
Intraday and swing traders looking for clear visual stop references on charts.
This script does not execute orders but serves as a visual and analytical tool to complement trading decisions by representing ATR-based stop zones dynamically.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.