OPEN-SOURCE SCRIPT

Reversal Candlestick Patterns

234
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.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.