OPEN-SOURCE SCRIPT
Updated

Pattern Atlas: Candlestick Indicator [AxeAlgo]

1 383
Pattern Atlas: Candlestick Indicator [AxeAlgo]
Companion indicator to Pattern Atlas : Candlestick [AxeAlgo] (Library #1 of the AxeAlgo Pattern Atlas)

WHAT THIS INDICATOR IS

This is a complete candlestick pattern scanner built on top of the Pattern Atlas : Candlestick [AxeAlgo] library — 23 classical candlestick patterns, detected on every bar and turned into on-chart highlighting, a live scanner table, and alerts. It doesn't implement any pattern math itself; every detection is delegated to the library's detect*() functions, so what you see here is exactly what that library finds, with nothing added or reinterpreted.

Candlestick reading is one of the oldest tools in technical analysis, tracing back to Steve Nison's work bringing Japanese candlestick charting to Western traders. The 23 patterns here follow that standard catalog (cross-checked against TA-Lib's CDL* function list), so anyone who already knows what a Morning Star or a Bullish Engulfing bar looks like will recognize exactly what's being flagged.

THE 23 PATTERNS IT SCANS

Single-bar patterns (9): Doji, Long-Legged Doji, Dragonfly Doji, Gravestone Doji, Hammer / Hanging Man, Inverted Hammer / Shooting Star, Marubozu, Spinning Top, Belt Hold.

Two-bar patterns (6): Engulfing, Harami, Harami Cross, Piercing Line / Dark Cloud Cover, Tweezer Top / Bottom, Kicker.

Three-bar-and-longer patterns (8): Morning / Evening Star, Morning / Evening Doji Star, Three Soldiers / Crows, Three Inside Up / Down, Three Outside Up / Down, Abandoned Baby, Rising / Falling Three Methods (the one pattern spanning 5 bars), Stick Sandwich.

READING THE CHART

Each matched pattern gets a box drawn around the exact bars it spans, colored gold for bullish, pale gold-white for bearish, and bright gold for neutral (indecision) patterns — colors are user-configurable. On top of that, a "pin" marker appears at the bar: bullish pins hang below the bar, bearish pins sit above it, and neutral patterns get a plain floating gem with no stem, since indecision doesn't have a direction to anchor to. Hovering any pin or gem shows the full description of everything that matched on that bar, including a measured strength percentage for each one — not just the pattern name repeated back at you.

Strength is a generic, direction-based read on how decisively the bar closed within its own high-low range (near the high for a bullish match, near the low for a bearish one, or a small body relative to the range for a neutral one) — a rough, pattern-agnostic proxy, not a bespoke ratio breakdown per pattern, since that level of internal detail isn't something the library exposes.

THE SCANNER TABLE

A table lists all 23 patterns grouped by category, with a live status column showing each one's current match percentage (or a dash when nothing's matching on the current bar). Position, text size, and whether it's shown at all are all configurable. This table is intentionally live — it reflects the forming bar in real time rather than waiting for the bar to close, since it's meant as a "what's happening right now" readout rather than a persisted signal.

FILTERS AND SETTINGS

Every pattern has its own on/off checkbox, and each of the three categories (Single-Bar, Two-Bar, Three-Bar+) has a master switch above its checkboxes to turn the whole group off in one click.

Three additional filters are available, all off by default so the scanner stays an unbiased detector unless you opt in:
- Volume confirmation — requires a match to occur on at least a chosen multiple of its own trailing average volume before it counts.
- Trend context — requires bullish matches to occur against a downtrend and bearish matches against an uptrend (the classical reading that a reversal candle means more against the trend it's reversing than in the middle of a random chop). Neutral patterns are never filtered by this, since they don't imply a direction.
- Minimum strength — hides matches below a chosen strength percentage.

These filters affect what's drawn on the chart and what feeds the pin/gem tooltips. They do not affect the scanner table, which always shows the library's raw, unfiltered read of the current bar, and they do not affect the per-pattern alerts described below, which fire independently of the visual display settings.

ALERTS

Every pattern has its own alert condition available in TradingView's Create Alert dialog, plus three combined conditions (any bullish pattern, any bearish pattern, any neutral pattern), plus one dynamic alert with a full message listing every pattern that matched, grouped by direction, with each one's measured description and strength.

A NOTE ON REPAINTING

Every box, pin, gem, and alert is gated on the bar actually having closed — nothing here fires or gets drawn off a still-forming bar, regardless of your alert-frequency setting in TradingView's dialog. The one exception is the scanner table, which is deliberately live so it can answer "what's happening on this bar right now" — that's a readout, not a persisted signal, and it's expected to change as the current bar develops.

PART OF A LARGER SERIES

This indicator is the companion to Library #1 of the AxeAlgo Pattern Atlas — a planned set of Pine libraries splitting pattern detection by the method actually used to find each kind of pattern: candlestick shape (this one), classical chart/geometric patterns (Library #2), harmonic Fibonacci-ratio patterns (Library #3), and market-structure concepts (order blocks, liquidity, Wyckoff-style events). Each library has, or will have, its own companion scanner indicator built the same way this one is.

DISCLAIMER

This indicator is a technical analysis tool for identifying classical candlestick shapes in historical and live price data. It does not predict future price movement, and a detected pattern — including its measured strength — is a description of past price action, not a signal guaranteed to repeat. Nothing in this script constitutes financial advice. Always combine pattern recognition with your own risk management and broader analysis before making any trading decision.


Release Notes
* Dashboard Typo Fixed

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.