OPEN-SOURCE SCRIPT
Wick Reversal - Gavi

Detect clean single-bar reversal candles (hammer / shooting star variants) with objective rules.
This script flags bars where a dominant wick overwhelms the body and the close finishes near the relevant extreme of the candle—an evidence-based way to find potential turns or continuation traps.
What it detects
A bar is labeled a Wick Reversal when any of these structures occur:
Bullish candidates (WR↑):
Bearish candidates (WR↓):
Close-percent is measured from the high (bullish) or from the low (bearish), matching the commonly used definition.
This script flags bars where a dominant wick overwhelms the body and the close finishes near the relevant extreme of the candle—an evidence-based way to find potential turns or continuation traps.
What it detects
A bar is labeled a Wick Reversal when any of these structures occur:
Bullish candidates (WR↑):
- Long lower wick ≥ Wick_Multiplier × Body, and
- Close finishes in the top X% of the bar’s range.
- Doji and flat-top variants are also handled (size-filtered).
Bearish candidates (WR↓):
- Long upper wick ≥ Wick_Multiplier × Body, and
- Close finishes in the bottom X% of the bar’s range.
- Doji and flat-bottom variants are also handled (size-filtered).
Close-percent is measured from the high (bullish) or from the low (bearish), matching the commonly used definition.
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.