OPEN-SOURCE SCRIPT
已更新 Candlestick Pattern Scanner

Candlestick Pattern Scanner
Candlestick Pattern Scanner detects 28 classic Japanese candlestick patterns, 13 bullish, 13 bearish, 2 neutral, and qualifies every reversal pattern against its own prior-trend context, not candle shape alone. The same geometry (small body, long lower wick) reads as a Hammer after a downtrend and a Hanging Man after an uptrend.
HOW IT WORKS
Trend Engine, combines EMA slope, price displacement, market structure (higher-highs/higher-lows vs. lower-highs/lower-lows), and an optional efficiency-ratio directional weight into a 5-state trend read (Strong Downtrend to Strong Uptrend).
Off / Standard / Strict per pattern, every pattern is configured independently. Strict demands tighter geometric tolerance, a stronger prior trend, and better close/open placement than Standard.
Quality Score (0-100), geometry (40%), trend alignment (30%), proximity to a recent swing high/low (15%), and range-vs-ATR normalcy (15%). Ranks how far beyond the bare minimum a detection sits; it never changes whether a pattern fires, only how it's ranked and filtered.
Conflict resolution, when multiple patterns fire on the same bar, Display Mode picks what gets labeled: All, Highest Priority (multi-candle > two-candle > single-candle > neutral), or Highest Quality (default).
Built-in legend, a bottom-left table maps every abbreviation to its full pattern name.
BUILT-IN TRACKING
The Data Window keeps a running count of every pattern found, grouped Bullish/Bearish/Neutral with totals, a quick read on which patterns are actually showing up on this symbol/timeframe, not just single detections.
INPUTS
DISCLAIMER
This is an independent, original implementation of publicly known candlestick concepts, not a clone of, or claim of equivalence to, any specific commercial product. Every threshold is disclosed in the script itself. Classical candlestick patterns are not inherently predictive; use the Quality Score and your own back-testing to judge whether a given pattern/context combination has real edge on the symbol and timeframe you're trading, and always apply proper risk management.
Candlestick Pattern Scanner detects 28 classic Japanese candlestick patterns, 13 bullish, 13 bearish, 2 neutral, and qualifies every reversal pattern against its own prior-trend context, not candle shape alone. The same geometry (small body, long lower wick) reads as a Hammer after a downtrend and a Hanging Man after an uptrend.
HOW IT WORKS
Trend Engine, combines EMA slope, price displacement, market structure (higher-highs/higher-lows vs. lower-highs/lower-lows), and an optional efficiency-ratio directional weight into a 5-state trend read (Strong Downtrend to Strong Uptrend).
Off / Standard / Strict per pattern, every pattern is configured independently. Strict demands tighter geometric tolerance, a stronger prior trend, and better close/open placement than Standard.
Quality Score (0-100), geometry (40%), trend alignment (30%), proximity to a recent swing high/low (15%), and range-vs-ATR normalcy (15%). Ranks how far beyond the bare minimum a detection sits; it never changes whether a pattern fires, only how it's ranked and filtered.
Conflict resolution, when multiple patterns fire on the same bar, Display Mode picks what gets labeled: All, Highest Priority (multi-candle > two-candle > single-candle > neutral), or Highest Quality (default).
Built-in legend, a bottom-left table maps every abbreviation to its full pattern name.
BUILT-IN TRACKING
The Data Window keeps a running count of every pattern found, grouped Bullish/Bearish/Neutral with totals, a quick read on which patterns are actually showing up on this symbol/timeframe, not just single detections.
INPUTS
- General: master Bullish/Bearish/Neutral toggles, Display Mode, Use Full Names, Show Quality Score, Minimum Quality.
- Trend Engine: lookback, EMA lengths, strong/weak thresholds, efficiency-ratio toggle, ATR length, tolerance factors.
- Pattern Configuration: Off/Standard/Strict per pattern, 28 total.
- Appearance: bullish/bearish/neutral colors, label size/offset/transparency, legend table toggle.
- Alerts: per-direction toggles and a minimum alert quality.
DISCLAIMER
This is an independent, original implementation of publicly known candlestick concepts, not a clone of, or claim of equivalence to, any specific commercial product. Every threshold is disclosed in the script itself. Classical candlestick patterns are not inherently predictive; use the Quality Score and your own back-testing to judge whether a given pattern/context combination has real edge on the symbol and timeframe you're trading, and always apply proper risk management.
發行說明
- Default quality to 95
- Visually hidden labels under quality threshold
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。