OPEN-SOURCE SCRIPT
Updated Pin Bar (Body in Half Candle)

Pine Script: Relaxed PIN Bar Detection
This indicator highlights PIN Bars with slightly relaxed conditions, designed for better usability in real-market intraday trend and pullback scenarios.
Detection Criteria:
Body ≤ 38% of total candle size
→ Standard is ~33%; relaxed to 38% to include more usable patterns.
Wick ≥ 1.7 × body size
→ Standard is 2.0×; relaxed to 1.7× to capture slightly imperfect but meaningful rejection candles.
This indicator highlights PIN Bars with slightly relaxed conditions, designed for better usability in real-market intraday trend and pullback scenarios.
Detection Criteria:
Body ≤ 38% of total candle size
→ Standard is ~33%; relaxed to 38% to include more usable patterns.
Wick ≥ 1.7 × body size
→ Standard is 2.0×; relaxed to 1.7× to capture slightly imperfect but meaningful rejection candles.
Release Notes
auto set triangle sizeRelease Notes
wick > 1.68 * bodyRelease Notes
size auto --> size tinyOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.