Candlestick Indicators: All 63 Detectors, and What They Returned
Candlestick indicators are what a pattern becomes once somebody writes it down as code. A shape you recognise by eye turns into a predicate over four numbers per bar, and the predicate is either satisfied or it is not. Our engine carries 63 of them, and this page is the whole list plus the measurements.
That translation is where the interesting things happen. Two patterns every textbook separates turn out to be one function. A clause sits in a detector doing nothing at all. And when you finally score the outputs, most of them land under the bar they have to clear. All of it comes out of the same place: reading crates/vike-indicators/src/indicators/patterns.rs and then running it.
What a candlestick indicator actually is
A pattern in a book is a drawing plus a paragraph. A pattern in an engine is a function that reads open, high, low and close, and returns one number for every bar you feed it.
Take the hammer. The drawing shows a small body perched above a long lower wick, and nothing else. The function says body <= 0.3 range && lower >= 2 body && upper <= body, and batch_hammer applies exactly that to each candle in turn. No trend context, no support level, no judgement about whether the wick "looks" convincing. Three comparisons, and the answer is yes or no.
Everything you gain and everything you lose follows from that swap. You gain scale — 364,147 bars in a few seconds, with no fatigue and no favourite setups. You lose every scrap of context the eye was quietly supplying, which is a much bigger loss than most people expect, and the scores further down are what it costs.
What a detector returns: plus one hundred, minus one hundred, zero
patterns.rs.Each of the 63 kernels returns one line of numbers, one value per bar, drawn from exactly three: +100 for bullish, -100 for bearish, 0 for nothing found.
Magnitude carries no meaning. A hundred is not a confidence score and never grows with how textbook the candle looked — it is a flag borrowed from the Python implementation this crate was ported from, where the patterns were plain integers. Only the sign matters, and only 25 of the detectors ever emit both signs. Another 23 can only ever return +100, and 15 only ever -100, so their polarity is fixed before any data arrives.
One detail deserves more attention than it usually gets. The output vector starts life filled with zeros, so a bar that produced no pattern and a bar the detector could not judge yet both read zero. Several kernels need a ten-bar average body before they can say anything, and during that warm-up they say 0 — which is indistinguishable from a confident no. The volume-profile kernel in the same engine does the opposite and warms up with NaN, and I trust that one more for exactly this reason: a missing value that admits it is missing cannot be mistaken for evidence.
The 63 detectors in the engine
| Pattern | Detector | Bars | Sign · columns read |
|---|---|---|---|
| One bar 18 detectors | |||
| Doji | batch_doji | 1 | ▲OHLC |
| Hammer | batch_hammer | 1 | ▲OHLC |
| Inverted Hammer | batch_inverted_hammer | 1 | ▲OHLC |
| Hanging Man | batch_hanging_man | 1 | ▼OHLC |
| Shooting Star | batch_shooting_star | 1 | ▼OHLC |
| Dragonfly Doji | batch_dragonfly_doji | 1 | ▲OHLC |
| Gravestone Doji | batch_gravestone_doji | 1 | ▼OHLC |
| Long-Legged Doji | batch_longlegged_doji | 1 | ▲OHLC |
| Rickshaw Man | batch_rickshaw_man | 1 | ▲OHLC |
| Takuri | batch_takuri | 1 | ▲OHLC |
| Marubozu | batch_marubozu | 1 | ▲▼OHLC |
| Closing Marubozu | batch_closing_marubozu | 1 | ▲▼OHLC |
| Spinning Top | batch_spinning_top | 1 | ▲OHLC |
| High Wave | batch_high_wave | 1 | ▲OHLC |
| Long Line | batch_long_line | 1 | ▲▼OC |
| Short Line | batch_short_line | 1 | ▲OHLC |
| Belt Hold | batch_belt_hold | 1 | ▲▼OHLC |
| Opening Marubozu | batch_opening_marubozu | 1 | ▲▼OHLC |
| Two bars 18 detectors | |||
| Engulfing | batch_engulfing | 2 | ▲▼OC |
| Doji Star | batch_doji_star | 2 | ▲▼OHLC |
| Harami | batch_harami | 2 | ▲▼OC |
| Harami Cross | batch_harami_cross | 2 | ▲▼OC |
| Piercing | batch_piercing | 2 | ▲OLC |
| Dark Cloud Cover | batch_dark_cloud_cover | 2 | ▼OHC |
| Counterattack | batch_counterattack | 2 | ▲▼OC |
| Meeting Lines | batch_meeting_lines | 2 | ▲▼OC |
| Separating Lines | batch_separating_lines | 2 | ▲▼OC |
| Matching Low | batch_matching_low | 2 | ▲OC |
| On Neck | batch_on_neck | 2 | ▼OLC |
| In Neck | batch_in_neck | 2 | ▼OLC |
| Thrusting | batch_thrusting | 2 | ▼OLC |
| Kicking | batch_kicking | 2 | ▲▼OHLC |
| Kicking by Length | batch_kicking_by_length | 2 | ▲▼OHLC |
| Homing Pigeon | batch_homing_pigeon | 2 | ▲OC |
| Gapping Side-by-Side White | batch_gap_side_side_white | 2 | ▲OC |
| Tasuki Gap | batch_tasuki_gap | 2 | ▲▼OC |
| Three bars 19 detectors | |||
| Morning Star | batch_morning_star | 3 | ▲OHC |
| Evening Star | batch_evening_star | 3 | ▼OLC |
| Morning Doji Star | batch_morning_doji_star | 3 | ▲OHC |
| Evening Doji Star | batch_evening_doji_star | 3 | ▼OLC |
| Three White Soldiers | batch_three_white_soldiers | 3 | ▲OHC |
| Three Black Crows | batch_three_black_crows | 3 | ▼OLC |
| Identical Three Crows | batch_identical_three_crows | 3 | ▼OC |
| Three Inside | batch_three_inside | 3 | ▲▼OC |
| Three Outside | batch_three_outside | 3 | ▲▼OC |
| Three Stars in the South | batch_three_stars_in_south | 3 | ▲OHLC |
| Abandoned Baby | batch_abandoned_baby | 3 | ▲▼OHLC |
| Advance Block | batch_advance_block | 3 | ▼OHC |
| Stalled Pattern | batch_stalled_pattern | 3 | ▼OC |
| Two Crows | batch_two_crows | 3 | ▼OC |
| Upside Gap Two Crows | batch_upside_gap_two_crows | 3 | ▼OC |
| Tristar | batch_tristar | 3 | ▲▼OHLC |
| Unique Three River | batch_unique_three_river | 3 | ▲OLC |
| Stick Sandwich | batch_stick_sandwich | 3 | ▲OC |
| Up/Down-side Gap Three Methods | batch_xside_gap_three_methods | 3 | ▲▼OC |
| Four bars 3 detectors | |||
| Three-Line Strike | batch_three_line_strike | 4 | ▲▼OC |
| Concealing Baby Swallow | batch_concealing_baby_swallow | 4 | ▲OHLC |
| Hikkake | batch_hikkake | 4 | ▲▼HLC |
| Five bars 5 detectors | |||
| Ladder Bottom | batch_ladder_bottom | 5 | ▲OHC |
| Rising/Falling Three Methods | batch_rise_fall_three_methods | 5 | ▲▼OHLC |
| Mat Hold | batch_mat_hold | 5 | ▲OLC |
| Modified Hikkake | batch_hikkake_mod | 5 | ▲▼HLC |
| Breakaway | batch_breakaway | 5 | ▲▼OC |
vike-indicators, parsed straight out of the crate source — bar count, price columns and possible signs included. Linked names have a full breakdown here; the rest are listed because leaving them out would be the more flattering choice.Nothing in the table below is typed. A script reads patterns.rs, pulls out every kernel, and records what the source says about each: how many bars it needs, which price columns it binds, and which signs it can emit. Rename a function in the crate and this page changes with it.
Eighteen have a full page here already, linked in the table. The rest are inventory, and being honest about that is the point — a page claiming deep coverage of all of them would be the exact kind of writing this section exists to replace.
Two of the names are not Japanese at all. batch_hikkake and batch_hikkake_mod come from Daniel Chesler's 2003 work on false breakouts, and they are also the only two kernels in the file that never bind the open column. Everything else traces back to the Sakata and Nison lineage, whatever the English rendering.
The families the source gives away
Read the file top to bottom and the 63 stop looking like 63 separate ideas. They fall into families, and the families are visible in the code rather than in any taxonomy somebody imposed afterwards.
Same rule, opposite sign. Strip comments and whitespace from batch_hammer and batch_hanging_man and the two functions are identical apart from the constant they write out. Same for batch_inverted_hammer and batch_shooting_star. The detector cannot tell a hammer from a hanging man, because there is nothing in the candle to tell them apart — the difference lives in the trend that preceded it, and no single-bar kernel reads that.
One constant apart. batch_counterattack and batch_meeting_lines share every line; one accepts closes within 3% of the average body, the other within 2%. Meeting lines is counterattack with a tighter tolerance, nothing more.
Mirrored across a price column. This one is easy to miss and changes what a detector can even see. batch_three_white_soldiers binds open, high and close; its mirror batch_three_black_crows binds open, low and close. So a soldier may carry a lower wick of any length whatsoever and pass, while a crow can hide an upper wick just as freely. Fifteen kernels are half-blind this way, and the two charts below are one bar read by both members of a sign twin — the same candle scored long, then scored short.
Where a detector disagrees with the eye
Now the part you only find by reading source. batch_rickshaw_man and batch_longlegged_doji are separate functions in the crate, and separate patterns in every book, and they flag identical bars.
The rickshaw man is the long-legged doji's three clauses plus a fourth: the body's midpoint must sit within 25% of the range's midpoint. That clause can never bind. The distance between those two midpoints always equals half the difference between the shadows, and once both shadows are at least 30% of the range, their difference cannot exceed 40% of it — so the distance tops out at 20%, comfortably inside a 25% tolerance. Across my scan the long-legged doji fired 13,141 times and the rickshaw man fired 13,141 times, on the same bars, with no exceptions. The long-legged doji page works through the algebra in full.
A second dead clause turned up in batch_three_white_soldiers. After the colour, size, containment and shadow tests, the kernel checks that the three closes ascend. Over the same 364,147 bars, 23 candidates reached that final test and 23 survived it. The clause is not redundant as logic — you can construct a triple that breaks it — but on this tape it never once made a decision. When I first saw that I assumed a bug in my port, so I re-ran it against the source clause by clause before writing it down.
Every ported detector, scored
| Detector | Fired | 1 per | Resolved | Win rate |
|---|---|---|---|---|
| Evening Star | 1 | 364,147.0 | 1 | 100.0% |
| Three Black Crows | 44 | 8,276.1 | 41 | 80.5% |
| Piercing | 16 | 22,759.2 | 14 | 64.3% |
| Dark Cloud Cover | 28 | 13,005.2 | 28 | 64.3% |
| Inverted Hammer | 18,769 | 19.4 | 16,990 | 57.2% |
| Engulfing | 63,671 | 5.7 | 58,545 | 56.8% |
| Spinning Top | 83,051 | 4.4 | 76,885 | 56.5% |
| Hanging Man | 15,219 | 23.9 | 14,016 | 56.3% |
| Hammer | 15,219 | 23.9 | 13,894 | 56.0% |
| Marubozu | 2,861 | 127.3 | 2,531 | 55.8% |
| Gravestone Doji | 785 | 463.9 | 614 | 55.7% |
| Doji | 24,144 | 15.1 | 21,537 | 55.3% |
| Long-Legged Doji | 13,141 | 27.7 | 11,665 | 55.3% |
| Rickshaw Man | 13,141 | 27.7 | 11,665 | 55.3% |
| Harami | 26,883 | 13.5 | 25,474 | 54.9% |
| Dragonfly Doji | 820 | 444.1 | 707 | 54.7% |
| Shooting Star | 18,769 | 19.4 | 17,004 | 53.9% |
| Morning Star | 2 | 182,073.5 | 2 | 50.0% |
| Three White Soldiers | 23 | 15,832.5 | 23 | 39.1% |
Nineteen of the kernels are ported into Python here, verified column-for-column against the crate, and run over 299 Binance spot pairs — 364,147 daily bars from August 2017 onward.
Every firing was resolved the same way: enter at the close, take the first touch over the next ten bars of a 6% target or an 8% stop, and score a bar that touched both as a loss. Long for +100, short for -100. That bracket is the one our MACD and ichimoku pages use, so these numbers sit next to those, and it carries the same hurdle: paying eight to win six needs a 57.1% hit rate before a cent of fees.
Two of the nineteen clear it. batch_inverted_hammer came in at 57.2% across 16,990 resolved signals, which beats the hurdle by a tenth of a point and dies to the first taker fee. batch_three_black_crows scored 80.5% — on 41 resolved signals in nine years of tape, a sample far too thin to plan around, which is itself the finding. The other seventeen finished under water.
Where candlestick indicators fail
The failure mode is not that these detectors are wrong. It is that they are right about the geometry and the geometry was never the edge.
Look at what happens to a sign twin. batch_hammer and batch_hanging_man flag the identical 15,219 bars; scored long the set returns 56.0%, scored short 56.3%. Both sit under the hurdle. A rule whose bullish and bearish readings both lose money is not describing direction — it is describing a wick, and paying the spread for the privilege.
Rarity is the other trap, and it runs the opposite way from intuition. batch_evening_star fired once in 364,147 bars. batch_morning_star managed two. Those detectors demand a gap that a venue trading every second of the year almost never leaves, so a scanner built on them will sit silent for years and then hand you a sample of one. The three examples below are real detections that lost: a dragonfly doji stopped out in five days, a marubozu stopped out in two.
None of this argues for abandoning the shapes. It argues for knowing which question a detector answers, which is always "did this geometry occur", and never "will price go up". The candlestick patterns hub breaks the shapes down one at a time, and volume profile is the same treatment applied to a very different input.
Frequently asked questions
Can candlestick patterns be used as indicators? Yes, and they already are — a detector is just an indicator whose output happens to be three-valued. What changes is that you can measure it, which is how you find out that most of them do not clear their break-even.
How many candlestick patterns can be detected automatically? Our engine ships 63. Counted by how many bars each kernel actually reads, 18 need one, 18 need two, 19 need three, and 8 stretch to four or five. Other libraries land near the same total because they mostly descend from one original list.
Which candlestick indicator is the most reliable?
On our tape, none of them reliably. batch_inverted_hammer was the only high-sample detector to clear the 6-for-8 hurdle, and it cleared by 0.1 points. Treat any page ranking patterns by "reliability" without publishing its bracket and its sample size as decoration.
Why do two patterns share one detector? Because the candle is identical and only the preceding trend differs. The shooting star and the inverted hammer are one function with two names, and any tool telling you it distinguished them from the bar alone is guessing.
Do I still need to read charts if the detection is automated? More than before. The detector supplies the geometry cheaply and reliably; every scrap of context — level, regime, what the market did to get here — is still entirely yours to supply.
This is educational material, not financial advice. Every figure above was measured on past bars under one fixed bracket, past results generalise poorly, and trading carries real risk of loss — size positions so that being wrong stays survivable.