OPEN-SOURCE SCRIPT
Wick to Close Distance (Pips)

This indicator measures the distance between the candle wicks and the closing price.
For every candle:
* Upper value = distance from High to Close
* Lower value = distance from Low to Close
Unlike traditional wick calculations, this tool always uses the **closing price as the anchor point**, ignoring the open price and candle direction.
Key Features:
* Works on Forex pairs, Gold (XAUUSD), and other instruments
* Automatically adjusts using tick size for accurate pip/point calculation
* Displays values directly on the chart for quick analysis
* Clean visualization with color-coded labels:
* Red = Upper distance (High → Close)
* Green = Lower distance (Low → Close)
Use Case:
This helps identify rejection strength and price behavior around the closing price, which can be useful for spotting liquidity grabs, reversals, and momentum shifts.
Settings:
* Option to filter minimum distance
* Option to limit number of labels for better chart clarity
Best used for:
Scalping, intraday trading, and price action strategies.
For every candle:
* Upper value = distance from High to Close
* Lower value = distance from Low to Close
Unlike traditional wick calculations, this tool always uses the **closing price as the anchor point**, ignoring the open price and candle direction.
Key Features:
* Works on Forex pairs, Gold (XAUUSD), and other instruments
* Automatically adjusts using tick size for accurate pip/point calculation
* Displays values directly on the chart for quick analysis
* Clean visualization with color-coded labels:
* Red = Upper distance (High → Close)
* Green = Lower distance (Low → Close)
Use Case:
This helps identify rejection strength and price behavior around the closing price, which can be useful for spotting liquidity grabs, reversals, and momentum shifts.
Settings:
* Option to filter minimum distance
* Option to limit number of labels for better chart clarity
Best used for:
Scalping, intraday trading, and price action strategies.
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.