OPEN-SOURCE SCRIPT

Horizontal ATR Lines

473
Disclaimer:
This script was generated using OpenAI’s ChatGPT. I take no responsibility for the correctness, performance, or financial impact of this indicator. Use it at your own risk and discretion.

This indicator draws horizontal ATR-based levels from the last closed candle on a user-selected timeframe. It is designed for traders who want to visualize realistic volatility zones for setting dynamic support/resistance, take-profit, or stop-loss levels.

What it does:

Calculates the Average True Range (ATR) using a customizable period and timeframe.

Plots four horizontal lines:

+1 ATR and –1 ATR from the last closed candle’s close

+X ATR and –X ATR, where X is a second custom multiplier

Each level includes a compact label showing:

The price of the level

The percentage distance from the close price

Use cases:

Identify realistic intraday or swing price movement boundaries

Build volatility-aware take-profit and stop-loss zones

Visually track market compression or expansion in context

Customization:

ATR period and timeframe

Two independent ATR multipliers

Custom color settings for each group of levels

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน