Free: indicator teardowns, a repaint checker and open-source scripts. No buy/sell signals, ever.

Taught to TradeSystems over signals.

Explainers / Candlestick Patterns Identified by repo3

Candlestick Patterns Identified by repo32, explained from the source

Candlestick Patterns Identified is an open-source TradingView indicator by repo32, first published in 2015 and updated to Pine version 6 in January 2026, with about 35,100 boosts. It marks 15 candlestick patterns on the chart with labels and gives each one an alert. This page walks through the published code, says what each rule really checks, and ends with where it fails. It does not say whether any pattern makes money, and it gives no trades.

Step 1: the two settings

There are two settings that change what is found, plus six colour settings.

Step 2: what each pattern checks

PatternWhat the code asks forTrend check
Dojibody at most 5% of the rangenone
Bullish / Bearish Haramithis body sits inside the previous body and is smaller, opposite colouryes
Bullish / Bearish Engulfingthis body covers the previous body and is larger, opposite colouryes
Piercing Lineafter a down bar, opens below the previous low and closes past the middle of the previous bodyyes
Bullish Beltopens at its low, below the lowest low of the 10 bars before, and closes up past the middle of the previous baryes
Bullish / Bearish Kickerthe previous bar is the other colour, and this bar opens at or beyond the previous openyes
Hanging Manrange over 4 times the body, body in the top quarter, and opens above the highs of the two bars beforeyes
Morning / Evening Starthree bars: a long bar, then a bar whose whole body sits beyond its close, then a reversal barnone
Shooting Starafter an up bar, opens above the previous close, upper shadow at least 3 times the bodynone
Hammer (H)range over 3 times the body, body in the top 40%none
Inverted Hammer (IH)range over 3 times the body, body in the bottom 40%none

Three things follow from the code itself:

The script draws everything from the current bar and the few before it. It asks for no other timeframe and no future bars, so a label on a closed bar stays where it is.

What we checked in Python

We ported the 15 rules to Python and ran them on invented random-walk prices with a typical move of 1% a bar, each bar built from 10 ticks so we could watch the live bar.

Charts with no gaps. On many 24-hour markets each bar opens at the previous bar's close. We built bars that way (10 runs of 3,000 bars). Eight of the 15 patterns never appeared once: Piercing Line, Bullish Belt, both Kickers, Hanging Man, Morning Star, Evening Star and Shooting Star. Each of them needs this bar to open away from the previous close (below the previous low, above the previous highs, or beyond the previous body), and that cannot happen when there is no gap. The rules are written for markets that open with gaps.

Charts with small gaps. With a small opening gap added (a typical size of 0.3%), all 15 appeared. Per 1,000 bars:

PatternPer 1,000 bars
Hammer81
Inverted Hammer79
Doji34
Bullish / Bearish Harami34 / 33
Bullish / Bearish Engulfing29 / 27
Morning / Evening Star11 / 12
Bullish / Bearish Kicker11 / 9
Piercing Line9
Shooting Star9
Bullish Belt5
Hanging Man4

Hammer and Inverted Hammer each mark about 1 bar in 12. All 108 Hanging Men were also marked H. About 4 in 5 dojis were also marked H or IH, because a doji with a long shadow on one side passes the hammer test too.

The live bar. While a bar is still forming, its high, low and close move, so a pattern can appear and then go. Of the bars where a Hammer showed at some tick, 75% no longer had it at the close. For the Doji it was 84%, for the Haramis about 65%, and for the Engulfing patterns about 38%. An alert set to fire the first time its condition is true will fire on many bars that end without the pattern.

Very low prices. The Hammer, Inverted Hammer and Hanging Man rules add 0.001 to the bar's range before dividing. On a price near 0.002, that small number is larger than the range itself, and in 3 runs of 3,000 bars no Hammer or Inverted Hammer appeared at all.

These figures describe the code on invented data, not any market.

Where it fails

Educational only. Not financial advice. Nothing here is a recommendation to buy or sell anything. Candlestick Patterns Identified is by repo32 on TradingView; this page describes its published open-source code in our own words and is not affiliated with the author. Simulation figures come from synthetic random-walk prices and say nothing about how the script behaves on any market.

Also explained: Repaint checker, VWAP, Supertrend, RSI, UT Bot Alerts, Nadaraya-Watson Envelope, Squeeze Momentum, What is repainting on TradingView?, Is TradingView backtesting accurate?, Chandelier Exit, WaveTrend Oscillator, QQE MOD, Pivot highs and lows, Hull Suite, Range Filter, Twin Range Filter, HalfTrend, ZigZag++, SSL Hybrid, CM MacD Ultimate MTF, Volume Profile / Fixed Range, ADX and DI, Support Resistance Channels, Market Structure Break & Order Block, Order Block Finder, Pivot Point SuperTrend, Trendlines with Breaks [LuxAlgo], Divergence for Many Indicators, TradingView script selling terms, Support and Resistance Levels with Break, Liquidity Swings [LuxAlgo], Pine Script errors, Breakout Probability (Expo), Did ChatGPT or Claude write your Pine Sc, Lorentzian Classification, SuperTrend AI (Clustering), Machine Learning Adaptive SuperTrend, Dynamic Swing Anchored VWAP, Support and Resistance Power Channel by , Support and Resistance (High Volume Boxe, Trendline Breakouts With Targets by Char, Breakout Finder by LonesomeTheBlue, Volume Flow Indicator by LazyBear, FVG Order Blocks by BigBeluga, CM_Williams_Vix_Fix by ChrisMoody, Bollinger + RSI Double Strategy by Chart, Ultimate Moving Average MTF by ChrisMood, Fibonacci Bollinger Bands by Rashad, MACD + SMA 200 Strategy by ChartArt, Pine Script v5 to v6, Moving Average Cross Alert, Multi-Timefr, WaveTrend Oscillator [WT] by LazyBear, WaveTrend with Crosses [LazyBear], CM_Price-Action-Bars by ChrisMoody, RSI Candles by glaz, CM RSI-2 Strategy Lower Indicator by Chr, CM Stochastic Multi-TimeFrame by ChrisMo, CM_Ultimate RSI Multi Time Frame by Chri, TonyUX EMA Scalper - Buy / Sell by tux, MACD 4C by vkno422, My Pine Script is valid. What did the va

Next steps

  • Get a script fixed. Compiles but behaves differently live, or changes after a reload? In a Pine Script Audit, an AI model reads every line and writes a report on what to fix for $49, or also fixes those problems for $149. It cannot prove a script is safe.
  • Check your own script. Paste its source into the free repaint checker. It runs in your browser and flags known patterns.
Before you trust its backtest: the Integrity Checklist, $19 one-offBack to Taught to Trade

No TradingView account yet? This affiliate link gives you a $15 coupon toward a paid plan, and we earn a commission if you buy one. The free plan is enough to follow this page.