OPEN-SOURCE SCRIPT
Reversal Candlestick Patterns

Reversal Candlestick Patterns
Reversal Candlestick Patterns is an indicator designed to detect classic candlestick reversal patterns with additional market context filtering.
The indicator identifies ten well-known reversal candlestick patterns and displays them directly on the chart as visual blocks. Each pattern is detected using its own logic, based on candle structure, position relative to local extremes, and the direction of the current trend.
Bullish patterns:
> Bullish Engulfing
> Morning Star
> Hammer
> Inverted Hammer
> Three White Soldiers
Bearish patterns:
> Bearish Engulfing
> Evening Star
> Hanging Man
> Shooting Star
> Three Black Crows
Pattern configuration
Detection of each individual pattern, its short name displayed on the chart, and the color of the highlighting block can be configured separately in the first two settings groups:
Bullish Patterns and Bearish Patterns.
This allows you to fully customize which patterns are used, how they are labeled, and how they are visually represented.
Trend filtering
The indicator includes an optional trend filter based on two Simple Moving Averages.
It is enabled using the Check Trend setting. The Trend Detection Length parameter is used simultaneously for several calculations:
> Length of the fast moving average
> Half of the slow moving average length
> Number of consecutive bars required to confirm trend direction
This approach helps filter out reversal patterns that form against a well-established trend.
External filters
The indicator supports external confirmation filters for bullish and bearish patterns. External filter settings are located in the External Filters group. For each filter, you can specify the value of an external indicator that must be met for a pattern to be confirmed. This allows flexible integration with oscillators, volume-based indicators, or custom scripts.
Visualization settings
Visualization settings control:
> Pattern name display
> Text size
> Block fill transparency
These settings affect only the visual presentation and do not influence the detection logic.
Alerts
The indicator provides two types of alerts:
1. Global alert for any detected pattern. Created by selecting “Any alert() function call” when setting up an alert.
2. Dedicated alert conditions for:
> Each individual pattern
> Any bullish pattern
> Any bearish pattern
Please note: if detection of a specific pattern is disabled in the settings, alerts for that pattern will not trigger.
Important note
Candlestick patterns should not be used as standalone trading signals. This indicator is intended to be used as part of a broader analysis, together with trend structure, key levels, volume, and other analytical tools.
Reversal Candlestick Patterns is an indicator designed to detect classic candlestick reversal patterns with additional market context filtering.
The indicator identifies ten well-known reversal candlestick patterns and displays them directly on the chart as visual blocks. Each pattern is detected using its own logic, based on candle structure, position relative to local extremes, and the direction of the current trend.
Bullish patterns:
> Bullish Engulfing
> Morning Star
> Hammer
> Inverted Hammer
> Three White Soldiers
Bearish patterns:
> Bearish Engulfing
> Evening Star
> Hanging Man
> Shooting Star
> Three Black Crows
Pattern configuration
Detection of each individual pattern, its short name displayed on the chart, and the color of the highlighting block can be configured separately in the first two settings groups:
Bullish Patterns and Bearish Patterns.
This allows you to fully customize which patterns are used, how they are labeled, and how they are visually represented.
Trend filtering
The indicator includes an optional trend filter based on two Simple Moving Averages.
It is enabled using the Check Trend setting. The Trend Detection Length parameter is used simultaneously for several calculations:
> Length of the fast moving average
> Half of the slow moving average length
> Number of consecutive bars required to confirm trend direction
This approach helps filter out reversal patterns that form against a well-established trend.
External filters
The indicator supports external confirmation filters for bullish and bearish patterns. External filter settings are located in the External Filters group. For each filter, you can specify the value of an external indicator that must be met for a pattern to be confirmed. This allows flexible integration with oscillators, volume-based indicators, or custom scripts.
Visualization settings
Visualization settings control:
> Pattern name display
> Text size
> Block fill transparency
These settings affect only the visual presentation and do not influence the detection logic.
Alerts
The indicator provides two types of alerts:
1. Global alert for any detected pattern. Created by selecting “Any alert() function call” when setting up an alert.
2. Dedicated alert conditions for:
> Each individual pattern
> Any bullish pattern
> Any bearish pattern
Please note: if detection of a specific pattern is disabled in the settings, alerts for that pattern will not trigger.
Important note
Candlestick patterns should not be used as standalone trading signals. This indicator is intended to be used as part of a broader analysis, together with trend structure, key levels, volume, and other analytical tools.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.