OPEN-SOURCE SCRIPT
Candlestick Pattern Detector (v8)

Indicator Description – Candlestick Pattern Detector (v8)
This indicator automatically detects and highlights some of the most popular candlestick reversal and continuation patterns directly on the chart. It’s designed for traders who want clear visual signals for price action setups without having to scan every candle manually.
Patterns Included:
Bullish Engulfing – Strong bullish reversal when a green candle fully covers the previous red candle.
Bearish Engulfing – Strong bearish reversal when a red candle fully covers the previous green candle.
Morning Star – A 3-candle bullish reversal pattern, signalling exhaustion of selling pressure.
Evening Star – A 3-candle bearish reversal pattern, signalling exhaustion of buying pressure.
Three White Soldiers – Three consecutive strong bullish candles with small wicks, often showing trend continuation.
Three Black Crows – Three consecutive strong bearish candles with small wicks, often marking trend continuation.
Hammer – A bullish rejection candle with a small body and a long lower wick, usually after a downtrend.
Inverted Hammer – A potential bullish reversal candle with a small body and a long upper wick.
Features:
Labels on chart: Each detected pattern is marked with a label (e.g., Bull Engulf, Morning Star, 3WS, Hammer).
Colored candles: Optionally colors bars when patterns appear (green for bullish, red for bearish).
Engulfing mode toggle: Choose between strict wick-to-wick engulfing or body-only engulfing.
Customizable display: Toggle individual patterns on/off to focus on the setups you use.
Why use this indicator?
Candlestick formations provide insight into market psychology and momentum shifts. By automating the detection of these patterns, this tool helps traders:
Spot potential reversals early.
Confirm trade setups with clear visual cues.
Save time manually checking each candle.
⚠️ Disclaimer: This indicator is for educational and analysis purposes only. It does not provide financial advice or guarantee profitability. Always combine candlestick signals with broader technical/fundamental analysis and risk management.
This indicator automatically detects and highlights some of the most popular candlestick reversal and continuation patterns directly on the chart. It’s designed for traders who want clear visual signals for price action setups without having to scan every candle manually.
Patterns Included:
Bullish Engulfing – Strong bullish reversal when a green candle fully covers the previous red candle.
Bearish Engulfing – Strong bearish reversal when a red candle fully covers the previous green candle.
Morning Star – A 3-candle bullish reversal pattern, signalling exhaustion of selling pressure.
Evening Star – A 3-candle bearish reversal pattern, signalling exhaustion of buying pressure.
Three White Soldiers – Three consecutive strong bullish candles with small wicks, often showing trend continuation.
Three Black Crows – Three consecutive strong bearish candles with small wicks, often marking trend continuation.
Hammer – A bullish rejection candle with a small body and a long lower wick, usually after a downtrend.
Inverted Hammer – A potential bullish reversal candle with a small body and a long upper wick.
Features:
Labels on chart: Each detected pattern is marked with a label (e.g., Bull Engulf, Morning Star, 3WS, Hammer).
Colored candles: Optionally colors bars when patterns appear (green for bullish, red for bearish).
Engulfing mode toggle: Choose between strict wick-to-wick engulfing or body-only engulfing.
Customizable display: Toggle individual patterns on/off to focus on the setups you use.
Why use this indicator?
Candlestick formations provide insight into market psychology and momentum shifts. By automating the detection of these patterns, this tool helps traders:
Spot potential reversals early.
Confirm trade setups with clear visual cues.
Save time manually checking each candle.
⚠️ Disclaimer: This indicator is for educational and analysis purposes only. It does not provide financial advice or guarantee profitability. Always combine candlestick signals with broader technical/fundamental analysis and risk management.
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.