OPEN-SOURCE SCRIPT
ATR STOPLOSS FINDER

📌 English Explanation
This script is an ATR (Average True Range) Stop Loss Finder with a 5-bar maximum marker.
Purpose:
Helps traders visualize dynamic stop loss levels based on ATR, and highlights the most recent maximum stop value within a given lookback period.
Key Features:
1. ATR Calculation:
- Calculates ATR using the selected smoothing method (RMA, SMA, EMA, WMA).
- Multiplied by a user-defined multiplier (default: ×1.01).
2. Long Stop Line:
- A trailing stop is drawn below the candle’s low (Low – ATR × Multiplier).
3. All Stop Dots:
- Small wine-colored dots are plotted along the stop line.
4. 5-bar MAX Dots:
- Within the last 5 bars (customizable), the highest stop value is highlighted with larger, brighter dots.
5. Label:
- The most recent 5-bar maximum stop is displayed with a label above the bar, pointing downward so it doesn’t block the candle.
6. Customization:
- Inputs allow adjustments for ATR length, smoothing type, multiplier, and lookback window.
Usage:
This indicator is useful for setting stop losses dynamically in trending markets. It visually tracks where your ATR-based stop should be and shows the strongest recent level.
📌 한글 설명
이 스크립트는 ATR(평균 진폭 지표) 기반 스탑로스 찾기 + 최근 5봉 최고 스탑 표시기입니다.
목적:
트레이더가 ATR 기반으로 변동성에 맞춘 동적 스탑로스를 설정하고,
최근 구간 중 가장 강력한 스탑 레벨을 시각적으로 확인할 수 있게 해줍니다.
핵심 기능:
1. ATR 계산:
- 선택한 이동평균 방식(RMA, SMA, EMA, WMA)으로 ATR을 계산.
- 사용자 지정 배수(기본 1.01배)를 곱함.
2. 롱 스탑 라인:
- 각 봉의 저가에서 (ATR × 배수)를 뺀 값으로 스탑 라인 생성.
3. 모든 스탑 점:
- 스탑 라인 위에 작은 와인색 점을 찍어 시각적으로 확인.
4. 최근 5봉 MAX 점:
- 최근 5봉(조정 가능) 동안의 최고 스탑 값을 더 진하고 크게 표시.
5. 라벨 표시:
- 최신 5봉 최고 스탑 값은 봉 위에 라벨로 표시되며, 꼭지는 아래로 향해 봉을 가리킴 → 봉을 가리지 않음.
6. 사용자 설정:
- ATR 길이, 이동평균 방식, 배수, 룩백 기간 등을 자유롭게 조정 가능.
활용법:
추세장에서 변동성에 맞춘 손절 라인을 자동으로 그려주므로 진입 후 스탑로스를 관리하는 데 유용합니다.
최근 최고 스탑 지점을 강조해주어 리스크 관리에 도움을 줍니다.
This script is an ATR (Average True Range) Stop Loss Finder with a 5-bar maximum marker.
Purpose:
Helps traders visualize dynamic stop loss levels based on ATR, and highlights the most recent maximum stop value within a given lookback period.
Key Features:
1. ATR Calculation:
- Calculates ATR using the selected smoothing method (RMA, SMA, EMA, WMA).
- Multiplied by a user-defined multiplier (default: ×1.01).
2. Long Stop Line:
- A trailing stop is drawn below the candle’s low (Low – ATR × Multiplier).
3. All Stop Dots:
- Small wine-colored dots are plotted along the stop line.
4. 5-bar MAX Dots:
- Within the last 5 bars (customizable), the highest stop value is highlighted with larger, brighter dots.
5. Label:
- The most recent 5-bar maximum stop is displayed with a label above the bar, pointing downward so it doesn’t block the candle.
6. Customization:
- Inputs allow adjustments for ATR length, smoothing type, multiplier, and lookback window.
Usage:
This indicator is useful for setting stop losses dynamically in trending markets. It visually tracks where your ATR-based stop should be and shows the strongest recent level.
📌 한글 설명
이 스크립트는 ATR(평균 진폭 지표) 기반 스탑로스 찾기 + 최근 5봉 최고 스탑 표시기입니다.
목적:
트레이더가 ATR 기반으로 변동성에 맞춘 동적 스탑로스를 설정하고,
최근 구간 중 가장 강력한 스탑 레벨을 시각적으로 확인할 수 있게 해줍니다.
핵심 기능:
1. ATR 계산:
- 선택한 이동평균 방식(RMA, SMA, EMA, WMA)으로 ATR을 계산.
- 사용자 지정 배수(기본 1.01배)를 곱함.
2. 롱 스탑 라인:
- 각 봉의 저가에서 (ATR × 배수)를 뺀 값으로 스탑 라인 생성.
3. 모든 스탑 점:
- 스탑 라인 위에 작은 와인색 점을 찍어 시각적으로 확인.
4. 최근 5봉 MAX 점:
- 최근 5봉(조정 가능) 동안의 최고 스탑 값을 더 진하고 크게 표시.
5. 라벨 표시:
- 최신 5봉 최고 스탑 값은 봉 위에 라벨로 표시되며, 꼭지는 아래로 향해 봉을 가리킴 → 봉을 가리지 않음.
6. 사용자 설정:
- ATR 길이, 이동평균 방식, 배수, 룩백 기간 등을 자유롭게 조정 가능.
활용법:
추세장에서 변동성에 맞춘 손절 라인을 자동으로 그려주므로 진입 후 스탑로스를 관리하는 데 유용합니다.
최근 최고 스탑 지점을 강조해주어 리스크 관리에 도움을 줍니다.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน