Direct answer
A worked example of a Doji is a step-by-step demonstration of how you decide whether a single candle qualifies as a Doji, using assumed open, high, low, and close values. It also makes the assumptions explicit—especially the rule for “near,” because different charting tools and analysts use different thresholds.
Mechanics and definition
A candlestick summarizes four prices over a time period: open, high, low, and close. The body is the distance between open and close. A Doji is a candle whose body is very small compared with its total range.
A common practical way to formalize “very small” is to compare the body size to the candle’s range:
- Body size = |Close − Open|
- Range = High − Low
- Doji condition (example rule): Body size ÷ Range ≤ T, where T is a chosen threshold like 0.1.
This is not a guaranteed universal standard; it is a workable definition you can apply consistently. That consistency is what lets you verify the example independently.
Worked numerical example (with explicit assumptions)
Assume one candle over a fixed time interval (for example, one hour). Use this assumed OHLC data:
- Open = 1.1000
- Close = 1.1002
- High = 1.1030
- Low = 1.0970
Now compute:
- Body size = |1.1002 − 1.1000| = 0.0002
- Range = 1.1030 − 1.0970 = 0.0060
- Body-to-range ratio = 0.0002 ÷ 0.0060 = 0.0333
Assume the Doji rule uses T = 0.1 (meaning the body is at most 10% of the range). Since 0.0333 ≤ 0.1, this candle qualifies as a Doji under the stated threshold.
Same idea, different outcome (threshold sensitivity)
Keep the candle extremes the same, but change the close to make the body bigger:
- Open = 1.1000
- Close = 1.1008
- High = 1.1030
- Low = 1.0970
Compute:
- Body size = |1.1008 − 1.1000| = 0.0008
- Range = 0.0060
- Ratio = 0.0008 ÷ 0.0060 = 0.1333
With T = 0.1, this would not qualify as a Doji. This illustrates a key “worked example” point: whether you label it a Doji can depend on the chosen definition.
Limitations and risks (material failure modes)
- Definition mismatch: If one chart uses a different threshold for “near,” the same candle may be labeled differently. Your verification should start by matching the exact formula you intend to use.
- Context dependence: A Doji describes a candle shape, not a complete market story by itself. The candle may reflect indecision, but outcomes can vary based on broader conditions.
- Measurement noise: Small differences in open/close values (or rounding) can change the body size and flip classification near the threshold.
- Execution and costs are not included: Candle data is observational. Real-world fills may differ from displayed values, and transaction costs can change net results, even if the candle pattern is correctly identified.
Verification and next question
To independently verify a Doji, take any candidate candle and compute body size, range, and the body-to-range ratio using the exact threshold T you choose. If you cannot reproduce the label, the most likely causes are different rounding, different OHLC values, or a different Doji threshold.
A useful next question is: Which threshold T does the specific platform or charting method you use apply when it labels a candle as a Doji?