A spinning top has a small body and visible shadows on both sides; a doji has Open close to Close under a declared rule. These shapes are often called indecision candles, but they do not measure participants’ psychology or the balance of all orders. Start with recorded prices and detector settings. Geometry is separate from a hypothesis about the next bar and from an executed trade.

What is a spinning top and what is a doji?

For ordinary price candles, range R = H − L, body B = |C − O|, upper shadow U = H − max(O, C) and lower shadow D = min(O, C) − L. Validate that O and C lie within [L, H] and B + U + D = R. A small body need not mean a small intrabar move, and upper/lower shadows need not be equal.

Use an explicit custom classification for this lesson: when R > 0, doji means B/R ≤ 5%. A spinning top requires 5% < B/R ≤ 25%, with each shadow at least 25% of R. Equality at 5% belongs to doji. These are exercise thresholds, not universal or validated trading parameters. The Japanese candlestick patterns guide explains ordinary OHLC construction; chart labels alone do not establish a statistical frequency or direction.

What are the doji variants and what sets them apart?

The examples below are separate candles, not consecutive observations in a real session. The spinning top has B/R = 10%, U/R = 40% and D/R = 50%, so it passes our custom rule. Swapping its O and C keeps those lengths and changes only body colour.

Six independent fictional OHLC examples, arbitrary price units
ShapeO / H / L / CRB / U / D
Spinning top100 / 105 / 95 / 101101 / 4 / 5
Doji100 / 105 / 95 / 100100 / 5 / 5
Long-legged100 / 110 / 90 / 100200 / 10 / 10
Dragonfly100 / 100 / 90 / 100100 / 0 / 10
Gravestone100 / 110 / 100 / 100100 / 10 / 0
Four-price100 / 100 / 100 / 10000 / 0 / 0

In ideal dragonfly geometry O = C = H with a lower shadow; gravestone has O = C = L and an upper shadow. Standard doji does not require equal shadows. Four-price doji has O = H = L = C, so R = 0: handle it separately before dividing B by R. It establishes no recorded price range, not a measurement of all-market liquidity or a count of orders. None of these names guarantees reversal.

A doji records a close near its open. Its shadows show the recorded range, not the identity or intentions of market participants.

Explicit settings can produce different labels

TA-Lib 0.6.4 compares a doji’s body with 10% of the mean High–Low range of the ten preceding candles, excluding the current one. Its spinning-top detector instead requires a body shorter than the preceding mean body and both current shadows longer than that body. Those defaults do not reproduce our custom percentage rules. Record the version and settings before counting labels near support or resistance. A location does not turn a count into a tested entry.

The site’s previously published analysis, dated 2 October 2026, compares 120 closed Kraken EUR/USD H1 trade-price candles from 21 September 2026 00:00 UTC through 25 September 23:00 UTC. Ten earlier candles only warm up the prior-range mean. This is one spot market, not a broker Bid/Ask feed or the whole Forex market.

Existing one-market sample: counts of classifications, not trades
Custom 5% ruleTA-Lib dojiTA-Lib not dojiTotal
Doji10111
Not doji9100109
Total19101120

Ten labels differ. The published 3% and 10% checks yield 7 and 14 recognitions; the original methodology records 120/120 reference agreement with C TA-Lib 0.6.4. These are classification results, not a win rate or a new trading study. More labels do not establish accuracy or profitability. The published CSV contains derived features rather than full source OHLC, so checking those features alone cannot independently replicate the study from market prices.

Check the published archive: 120 classifications and derived features (CSV), analysis code and manifest (ZIP), and methodology and calculator (in Polish). These files remain on our Polish site. The CSV and ZIP do not contain the provider’s original OHLC data.

What does it look like in an example?

Two published discrepancies show why the denominator matters. On 21 September 23:00 UTC, body 0.5 pips and current range 2 pips give B/R = 25%, failing 5%; the preceding mean range 8.6 gives TA-Lib threshold 0.86 pips, which passes. On 23 September 14:00, body 3.6 pips and range 232.1 give about 1.55%, passing 5%, but the preceding mean 15.53 gives threshold 1.553 pips, which fails. Here one pip is 0.0001 USD/EUR. The unusual high is retained in the original archive; same-provider M30 consistency reported in the methodology does not establish its cause or independent market confirmation.

Separate fictional EUR/USD geometry, not an entry recommendation
PricesO 1.0980, H 1.1030, L 1.0950, C 1.0982
LengthsR 80 pips; B 2; U 48; D 30, assuming a 0.0001 pip
Custom dojiB/R = 2.5%, below the declared 5% threshold
Long-legged exercise ruleAssume prior mean R 40 pips; current R is twice it and both shadows exceed 30% of current R

“Long” needs a benchmark. For the arbitrary-unit long-legged row above, assume each prior range is 8: R/8 = 2.5 and both shadows are 50% of R. The ordinary doji row has R/8 = 1.25 and fails our added requirement of R at least twice the prior mean. These are custom illustration rules, not default platform settings. A next-bar break can be another declared event, but it does not guarantee reversal or a sensible short entry.

Equal screen labels do not mean a zero body

Source O100.01 and C100.04 differ by 0.03. Range H−L is 0.40, so the body is 7.5%. A one-decimal display shows 100.0 for both. Classification from that label loses a difference retained in the data.

Full example precision versus rounded labelsThe hypothetical range is 99.80–100.20 and body 100.01–100.04. At right, O and C round to 100.0 at one decimal. The full-data body is 7.5%, not 0%.Retained dataH100.20L99.80C100.04O100.01Display:1 decimalO =100.0C =100.0Label ≠measurement0.03 ÷0.40 =7.5%
The narrow body at left has its true height on a shared linear scale. The right panel illustrates number formatting only.

Under the article's custom 5% rule, this candle is not a doji because 7.5% >5%. This separate example concerns display precision and does not alter the 120-candle study described above. Pass full values to CSV and the detector. Check label format, export precision and minimum price increment separately before comparing classifications.

Assumptions: one separate, entirely hypothetical candle: O100.01, H100.20, L99.80, C100.04. One-decimal rounding applies only to the display. The article's 5% rule uses recorded values.

How do you use these candles without falling into traps?

OHLC also does not reconstruct the intrabar sequence. Paths 100 → 105 → 95 → 100 and 100 → 95 → 105 → 100 give the same ordinary doji. They establish neither which side took control first nor how long price stayed at each level. On an open bar with O 100, H 105 and L 95, current C 100 gives a doji; final C 104 gives B/R = 40%, failing both custom doji and spinning-top rules. A closed-bar decision can only use the final shape after close.

A trading rule separately needs context, decision time, executable entry and exit, size and costs. Comparing a hammer, engulfing pattern or Harami requires their own definitions; calling them stronger does not establish higher profitability. A stop beyond a candle extreme is a chosen rule, not a promised maximum loss or proof that the trade premise is universally invalid there.

What to do tomorrow

  1. Record the definition, source, interval, price side, time zone, threshold and detector version. State how zero ranges and equality at a boundary are handled.
  2. Calculate body and shadows from full prices. Identify ideal dragonfly, gravestone and long-legged geometry without treating their names as direction guarantees.
  3. Use confirmed bars if that is the decision rule. Do not assign a later shape or confirmation to an earlier entry, and retain cases that fail the conditions.
  4. Check disagreements between detectors. Compare the current range with the prior mean, including unusual highs; a shared provider’s second interval is a consistency check, not independent confirmation.
  5. Use the technical analysis section to define a strategy separately. Specify all entries, exits, costs and failures before evaluation on unused data; two weeks of watching or a candle label does not establish an edge.