OPEN-SOURCE SCRIPT
Pin Bar Detector [SSFX]

Pin Bar Detector [SSFX] is an indicator designed to automatically identify Bullish Pin Bars and Bearish Pin Bars directly on the chart based on candle structure and wick proportions. It is built for price action traders who want a fast and objective way to spot rejection candles without manually checking every bar.
The script evaluates each candle using three main components:
For a Bullish Pin Bar, the indicator looks for candles with:
For a Bearish Pin Bar, the indicator looks for candles with:
One of the main strengths of this script is its flexibility. Users can adjust how strict the pin bar definition should be through the available inputs:
In addition to wick and body structure, the indicator also includes an optional candle color filter for stricter confirmation:
This helps filter out candles that visually resemble pin bars but close with weaker confirmation.
For visualization, the indicator supports:
This indicator can be useful in many price action situations, such as:
Disclaimer: This indicator is for educational and research purposes only. It does not provide financial advice or guarantee trading performance.
The script evaluates each candle using three main components:
- Body size relative to the full candle range
- Main wick size
- Opposite wick size
For a Bullish Pin Bar, the indicator looks for candles with:
- a small body
- a long lower wick
- a small upper wick
For a Bearish Pin Bar, the indicator looks for candles with:
- a small body
- a long upper wick
- a small lower wick
One of the main strengths of this script is its flexibility. Users can adjust how strict the pin bar definition should be through the available inputs:
- Max body % of candle range: sets the maximum body size allowed relative to the full candle range
- Min long wick % of candle range: requires the main wick to represent at least a certain percentage of the full candle range
- Max opposite wick % of candle range: limits the size of the opposite wick so the candle keeps a clean pin bar structure
In addition to wick and body structure, the indicator also includes an optional candle color filter for stricter confirmation:
- Bullish Pin Bar must close bullish
- Bearish Pin Bar must close bearish
This helps filter out candles that visually resemble pin bars but close with weaker confirmation.
For visualization, the indicator supports:
- bullish markers below bullish pin bars
- bearish markers above bearish pin bars
- optional text labels
- optional candle coloring for detected pin bars
- built-in alert conditions for TradingView alerts
This indicator can be useful in many price action situations, such as:
- spotting reversal candles at support and resistance
- identifying rejection candles in trending markets
- combining with market structure, supply and demand, trendlines, or moving averages
- scanning for price action setups across multiple timeframes
Disclaimer: This indicator is for educational and research purposes only. It does not provide financial advice or guarantee trading performance.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.