In this article
After this article, you can
- Construct Ask from Bid and a changing spread.
- Compare doji classification across quote sides.
Terms at hand: bid and ask (bid-ask prices) · spread (bid-ask spread) · Pip · Balance · Break-Even · Commission
A doji has equal or very close opening and closing prices under a stated tolerance. It records where a period ended relative to its start, not participants’ intentions or a promised reversal. Measure the body, range and shadows first. The hypothetical examples below show how the same body, rounded prices or a different quote side can change the classification.
What a doji is and what a zero body actually signals
Let O, H, L and C denote open, high, low and close. Body = |C−O|; range = H−L; upper shadow = H−max(O,C); lower shadow = min(O,C)−L. Equal or nearby O and C can resemble a horizontal line, but a fixed one- or two-pip allowance is not a universal definition. Check the detector’s denominator and tolerance rather than classify from the image scale.
OHLC does not reveal the complete intrabar sequence. O → H → L → C and O → L → H → C can produce the same candle. Its shape cannot identify which side “attacked first,” how many times price returned to a level or how many trades occurred. “Indecision” is an interpretive label rather than a direct emotional or order-flow measurement.
Separate a geometric definition from a trading interpretation. A strategy can test a candle shape, context or a later-bar condition, but must specify each rule and when it becomes available. Neither a familiar pattern name nor a book attribution establishes a universal profitable entry or a required stop distance.
Same session, different Bid and Ask bodies
The spread widens at the close in four model ticks. A Bid-chart doji need not mean equal Ask open and close.
Scroll sideways to see the full diagram
Hypothetical model: only four ticks in the period, EUR/USD, pip 0.0001. Ask = Bid + assumed spread. With an illustrative 5% threshold, Bid qualifies and Ask does not. No forecast or order outcome is implied. MT5 — price data describes standard OTC Bid candles; Ask is drawn here for a model comparison.
What types of doji exist and how do they differ
Doji names describe body position and shadow proportions. A cross-like form places its small body between shadows; long-legged doji has extended shadows on both sides, relative to a chosen comparison. Four equal prices give a zero-range case. Do not infer when or how often it occurs, market-wide liquidity or a future direction from the name alone.
A cross-like doji places near-equal opening and closing prices between the shadows. Symmetry is a geometric feature, not evidence that buyers and sellers had equal intentions or that both sides were exhausted.
A long-legged doji has extended upper and lower shadows. Specify what makes them long relative to other bars or a chosen scale. A large range and small body describe different quantities; neither implies a coin-toss advantage or establishes an FX performance result from an equity study.
A dragonfly doji has opening and closing prices near the high and a dominant lower shadow, producing a T-like silhouette. This locates O and C relative to the range; it does not reconstruct the order of intrabar prices or prove that buyers reclaimed territory. A bullish interpretation is a hypothesis to test.
A gravestone doji has O and C near the low and a dominant upper shadow, producing an inverted-T silhouette. It is the geometric counterpart of the dragonfly. Calling it bearish does not guarantee a subsequent decline or prove who traded at the high.
The same body can give a different measurement
Cases A and B below have the same 0.2-pip body but different ranges. Only A meets the illustrative rule. C has a larger body, and D has no range at all. A fixed pip allowance cannot reproduce this ratio, and replacing range with an average of earlier bodies creates a different classifier.
A small but visible body with two shadows is often called a spinning top; the boundary depends on the tool’s definition. Do not turn the names into an efficacy ranking. Any empirical result needs its actual instrument, timeframe, rules, data and costs. An equity-pattern result cannot simply be treated as a global FX probability.
A rounded image can conceal a threshold crossing
Suppose a hypothetical display shows O = 1.10000, C = 1.10004, H = 1.10050 and L = 1.09950. From those displayed values the ratio is 4%, so our 5% rule passes. Assume, only for this test, that each higher-precision input was rounded to the nearest 0.00001. Different original inputs can produce this same display.
| Variant | Exact O / C | Exact H / L | Body/range |
|---|---|---|---|
| A | 1.1000000 / 1.1000400 | 1.1005000 / 1.0995000 | 4.00% |
| B | 1.0999951 / 1.1000449 | 1.1004951 / 1.0995049 | About 5.03% |
A passes and B fails. With each rounding error at most half a step, a conservative ratio interval is 0.00003/0.00101 to 0.00005/0.00099, about 2.97–5.05%. The image alone cannot determine whether an unknown higher-precision input passes.
This bound comes from rounding, not statistical market uncertainty. If the source file actually supplies only five decimal places, classify those data; do not invent hidden digits. Require finer inputs only when comparing with a detector that uses them. Check invalid OHLC and zero-range cases explicitly rather than infer inactivity from a small candle.
Available information and execution prices
A forming candle has no final C yet. If a rule requires a closed doji and then the next close outside its range, those conditions are available only after both periods finish. Do not use the second close in a decision assigned to the first bar. A final weekly candle is likewise unavailable in the middle of that week. Extra confirmation can change entries, distances, costs and trade count; test its combined effect rather than presume it improves reliability.
In a separate hypothetical execution model, sell 10,000 EUR at Bid 1.09880 and assume closing at Ask 1.10120. The 24-pip adverse difference gives a USD 24 loss; a USD 2 round-trip commission makes it USD 26. Spread is already included in the given execution prices, so do not subtract it again. If an ordinary stop instead fills at Ask 1.10170, the loss is USD 29 plus USD 2 = USD 31. A fixed 5–10-pip buffer does not guarantee a maximum loss.
- Distances are not outcomes. In another hypothetical GBP/USD arithmetic model, a short fill at 1.2398 and planned exit at 1.2493 are 95 pips apart. Closing instead at 1.2280 or 1.2200 gives favorable distances of 118 or 198 pips, about 1.24 or 2.08 times 95, before costs.
- Keep currency explicit. At 10,000 GBP, one GBP/USD pip is USD 1, so those gross amounts are USD 95, USD 118 and USD 198. An EUR account requires a stated conversion rate; USD 1 is not automatically EUR 1.
- State the order rule. A target, trailing stop or stop-to-entry adjustment is a candidate for testing, not an instruction supplied by a candle name.
- Check size constraints. Apply the provider’s minimum and step and the complete planned cost allowance. A smaller budget can require skipping a trade rather than rounding volume upward.
The candle name does not determine a stop or target, and there is no universal ordering in which average doji stops must exceed pin-bar stops. A greater planned distance reduces a distance-based reward/risk ratio only if the target distance is held fixed. Fill prices, fees, changing spreads and conversion can change the actual outcome.
Data, quote side and conditions to test
Check the feed, quote side and period boundaries. MT5 documents OTC candles based on Bid and exchange-instrument candles based on Last; a displayed candle is not automatically the Ask price of a buy. The diagram shows how a changing spread can give different Bid and Ask bodies over the same four ticks.
Tick volume and real deal volume are different fields. In MT5, tick volume counts received ticks during bar formation, while deal volume may be unavailable for OTC markets. Check what the instrument and provider supply. A candle’s geometry alone does not measure global turnover or identify a lack of trading.
For any contextual filter, define trend, level construction or timeframe alignment before inspecting future outcomes. Current-bar values can change; using a completed weekly shape in an earlier daily decision introduces information unavailable then. There is no universal H1 minimum, H4 optimum or fixed annual frequency implied by doji.
Additional price-derived indicators are not automatically independent evidence. Compare a fixed baseline with a specified extra condition, keeping all accepted and rejected cases, available fill assumptions and costs. Parameter changes need separate evaluation on unused data. Agreement between several drawings does not establish a profitable rule.
Practical takeaway: A doji uses a stated open-to-close tolerance and quote side. Those choices can change whether a candle meets the definition.
Errors that can change the calculation
Check these concrete errors before interpreting a chart or detector output. They affect reproducibility rather than establish a hierarchy of candles or timeframes.
- Using a different denominator. Current range and earlier average bodies define different thresholds.
- Treating zero range as 0%. The ratio 0/0 is undefined; handle it separately.
- Ignoring precision. Identical rounded values can hide different higher-precision classifications.
- Using the final shape too early. Record when the candle and any subsequent condition close.
- Mixing price sides and costs. Bid and Ask can have different bodies; execution prices that already contain spread must not be charged spread again.
What to do when you close this page
Near-equal O and C summarize a period’s endpoints, without recovering its entire price path or the next direction. Cross-like, long-legged, dragonfly and gravestone forms describe geometry. Use the measurement exercises before assessing a separate trading rule.
- Recalculate the four cases. Confirm the 2%, 20%, 10% and undefined ratios; record why a fixed pip allowance differs.
- Recalculate the precision test. Verify that A and B round to the same displayed OHLC, then compare their exact ratios with 5%.
- Recalculate the quote-side model. Build Ask from the four Bid ticks and spreads, then measure its 6-pip body and 40-pip range. If testing trades, separately specify available order times, execution prices, size and all costs.
Related reading: Japanese candlesticks — the basics for the broader family of candlestick patterns; pin bar reversal trading for a comparison with another geometric pattern whose trading interpretation needs separate testing; most important candlestick patterns — the full survey that complements the doji family.
Check your understanding
One short exercise
About 2 min · you can try again
Bid returns to its open, but the final spread rises from 2 to 8 pips. Why does Ask have a non-zero body?
- Ask has the same price as Bid.
- Spread is the number of trades in the candle.
- The spread change adds 6 pips to C−O.
Check the answer and explanation
The spread change adds 6 pips to C−O.
With the final Bid unchanged, the larger spread raises final Ask by 6 pips relative to its open.
Frequently asked
How does doji differ from a pin bar and a spinning top?
The labels describe geometry under a stated definition. Doji has equal or nearby O and C; a spinning top has a visible small body and shadows; a pin-bar interpretation emphasizes a dominant shadow. Detector boundaries vary, so a universal 3–30% body rule or efficacy hierarchy does not follow. OHLC cannot directly measure intentions or guarantee a bounce. Our illustrative doji test uses body/range ≤ 5% only for this exercise.
What are the dragonfly doji and the gravestone doji?
A dragonfly places O and C near H with a dominant lower shadow; a gravestone places them near L with a dominant upper shadow. The shapes resemble T and inverted T. They describe where endpoints lie in the range, not the complete intrabar sequence or participants’ intentions. Bullish and bearish interpretations remain hypotheses; neither guarantees the next move or dictates a stop distance.
What changes when a rule waits for another candle?
A strategy may choose a later close outside the range as an additional condition, but the label alone does not guarantee its value. That condition is only known after the next period closes and can change entry prices, distances and trade count. Evaluate all cases after costs. A final weekly candle must not be used in an earlier decision as if its completed shape was already available.
Does a higher timeframe guarantee a more useful doji?
No universally best interval follows from equal or nearby O and C. Timeframes change inputs, horizons and costs, so test defined rules before ranking them. First check data precision and quote side: the diagram has Bid body 0/40 = 0%, but Ask body 6/40 = 15% after the spread widens. The same period can therefore pass our illustrative 5% threshold on Bid and fail on Ask.
Sources & bibliography
-
Steve Nison Japanese Candlestick Charting Techniques · New York Institute of Finance, 1991; chapters on stars and doji.
-
Steve Nison Beyond Candlesticks · John Wiley & Sons, 1994; discusses candlestick analysis, including doji, for Western-market readers.
-
Thomas Bulkowski Encyclopedia of Candlestick Charts · John Wiley & Sons, 2008; analyzes candlestick patterns, including doji.
-
TradingView Doji · Defines near-equal opening and closing prices and variable shadows. The lesson distinguishes this geometry from intentions, future direction and its own illustrative 5% threshold. www.tradingview.com ↗
-
CME Group Chart Types: candlestick, line, bar · Explains opening, high, low and closing prices and candle components. Used for measurements, without treating four OHLC values as the complete intrabar sequence or a proven trading edge. www.cmegroup.com ↗
-
MetaQuotes Price Data in the Trading Platform · Documents Bid-based OTC and Last-based exchange candles, received-tick volume and deal volume. Supports the quote-side distinction in the hypothetical changing-spread model. www.metatrader5.com ↗
