OPEN-SOURCE SCRIPT
Directional Close Line

**Directional Close Line**
This indicator connects candle closes to visualize price movement in a clean and structured way.
Instead of reacting to every candle individually, it groups consecutive movements into a single directional run:
• When price closes higher than the previous candle, the line continues upward
• When price closes lower, a new downward line begins
• The line only changes direction when a true reversal in closing price occurs
Key Features:
* Connects close-to-close only (ignores wicks and noise)
* Displays one continuous line per directional move
* Clearly highlights momentum and trend structure
* Helps identify clean runs and reversals in price action
This tool is useful for traders who focus on:
* Momentum tracking
* Breakout structure
* Trend clarity without candle noise
Designed for simplicity, clarity, and real market structure.
This indicator connects candle closes to visualize price movement in a clean and structured way.
Instead of reacting to every candle individually, it groups consecutive movements into a single directional run:
• When price closes higher than the previous candle, the line continues upward
• When price closes lower, a new downward line begins
• The line only changes direction when a true reversal in closing price occurs
Key Features:
* Connects close-to-close only (ignores wicks and noise)
* Displays one continuous line per directional move
* Clearly highlights momentum and trend structure
* Helps identify clean runs and reversals in price action
This tool is useful for traders who focus on:
* Momentum tracking
* Breakout structure
* Trend clarity without candle noise
Designed for simplicity, clarity, and real market structure.
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.