OPEN-SOURCE SCRIPT
Cập nhật Candle-Pattern Detector Pro

Candle-Pattern Detector Pro (CPD-Pro++)
This indicator automatically identifies 48 classic candlestick patterns on the chart, marking each occurrence with a label showing the pattern's abbreviation (e.g., HA = Hammer, LE = Long Engulfing, 3WS = Three White Soldiers, etc.), placed directly above or below the corresponding candle.
How it works
The script analyzes the relationship between body, upper shadow, and lower shadow of each candle (and of previous candles, when a pattern requires multi-bar confirmation) to classify reversal, continuation, and indecision formations — such as Hammer, Engulfing, Morning/Evening Star, Three Methods, Kicking, and others.
How traders can use it
Fast visual identification: instead of memorizing dozens of patterns, the trader sees the abbreviation directly on the candle where the pattern occurred.
Confluence with other tools: the patterns detected here work best as confirmation context — for example, a Hammer (HA) or Bullish Engulfing (LE) near a support/liquidity zone carries far more weight than the same pattern in isolation.
Configurable alerts: each of the 48 patterns has its own individual alertcondition, allowing traders to set up alerts for a specific pattern (e.g., only Morning Star) without having to watch the chart manually.
Per-pattern customization: each pattern can be individually enabled/disabled and given a custom color, letting traders build a lean setup with only the patterns relevant to their strategy (e.g., only top/bottom reversal patterns).
Limitations and recommended use
Candlestick patterns are probabilistic, not deterministic — they should not be used as a standalone entry/exit signal.
It's recommended to combine this indicator's signals with market structure (support/resistance, trend, volume) to filter out false positives.
This script is a technical analysis aid and does not constitute investment advice.
This indicator automatically identifies 48 classic candlestick patterns on the chart, marking each occurrence with a label showing the pattern's abbreviation (e.g., HA = Hammer, LE = Long Engulfing, 3WS = Three White Soldiers, etc.), placed directly above or below the corresponding candle.
How it works
The script analyzes the relationship between body, upper shadow, and lower shadow of each candle (and of previous candles, when a pattern requires multi-bar confirmation) to classify reversal, continuation, and indecision formations — such as Hammer, Engulfing, Morning/Evening Star, Three Methods, Kicking, and others.
How traders can use it
Fast visual identification: instead of memorizing dozens of patterns, the trader sees the abbreviation directly on the candle where the pattern occurred.
Confluence with other tools: the patterns detected here work best as confirmation context — for example, a Hammer (HA) or Bullish Engulfing (LE) near a support/liquidity zone carries far more weight than the same pattern in isolation.
Configurable alerts: each of the 48 patterns has its own individual alertcondition, allowing traders to set up alerts for a specific pattern (e.g., only Morning Star) without having to watch the chart manually.
Per-pattern customization: each pattern can be individually enabled/disabled and given a custom color, letting traders build a lean setup with only the patterns relevant to their strategy (e.g., only top/bottom reversal patterns).
Limitations and recommended use
Candlestick patterns are probabilistic, not deterministic — they should not be used as a standalone entry/exit signal.
It's recommended to combine this indicator's signals with market structure (support/resistance, trend, volume) to filter out false positives.
This script is a technical analysis aid and does not constitute investment advice.
Phát hành các Ghi chú
ok 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.