OPEN-SOURCE SCRIPT
Auto Trend Lines [ZOM]

Auto Trend Lines [ZOM] (ATL Pro) is a dynamic trendline detection tool designed to automatically identify, draw, and manage support and resistance lines based on market structure.
The indicator uses pivot-based logic to detect both short-term and long-term swing points, allowing it to construct trend lines that adapt to evolving price action. By connecting relevant pivot highs and lows, it generates real-time support and resistance levels without requiring manual drawing.
To reduce noise and improve clarity, the script includes a proximity filtering system that prevents overlapping or redundant lines. This ensures that only meaningful structural levels are displayed, keeping charts clean while preserving key information.
Each trend line is continuously monitored for interaction with price. The indicator tracks touches, extensions, and breakout conditions, providing insight into how price respects or violates these levels over time. Breakouts are confirmed using a configurable number of consecutive closes beyond a line, helping filter out false breaks and improve signal quality.
Additional features include:
- Automatic detection of small and large pivot-based trend lines
- Real-time extension of active support and resistance levels
- Breakout confirmation logic based on candle closes
- Touch detection for tracking line validation
- Optional breakout markers for visual confirmation
- Alert system for new lines, touches, and confirmed breakouts
- Built-in statistics table showing active support/resistance and total breakouts
The indicator is designed to assist with identifying trend direction, key reaction zones, and potential breakout opportunities, all while minimizing manual chart work.
Its flexible settings allow traders to tailor sensitivity, structure size, and visual output to fit different strategies — from scalping to swing trading.
The indicator uses pivot-based logic to detect both short-term and long-term swing points, allowing it to construct trend lines that adapt to evolving price action. By connecting relevant pivot highs and lows, it generates real-time support and resistance levels without requiring manual drawing.
To reduce noise and improve clarity, the script includes a proximity filtering system that prevents overlapping or redundant lines. This ensures that only meaningful structural levels are displayed, keeping charts clean while preserving key information.
Each trend line is continuously monitored for interaction with price. The indicator tracks touches, extensions, and breakout conditions, providing insight into how price respects or violates these levels over time. Breakouts are confirmed using a configurable number of consecutive closes beyond a line, helping filter out false breaks and improve signal quality.
Additional features include:
- Automatic detection of small and large pivot-based trend lines
- Real-time extension of active support and resistance levels
- Breakout confirmation logic based on candle closes
- Touch detection for tracking line validation
- Optional breakout markers for visual confirmation
- Alert system for new lines, touches, and confirmed breakouts
- Built-in statistics table showing active support/resistance and total breakouts
The indicator is designed to assist with identifying trend direction, key reaction zones, and potential breakout opportunities, all while minimizing manual chart work.
Its flexible settings allow traders to tailor sensitivity, structure size, and visual output to fit different strategies — from scalping to swing trading.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.