A doji is a candlestick whose open and close are at or very near the same price, producing a tiny or non-existent body. It reflects a session where buyers and sellers ended in rough balance. This guide explains how traders identify dojis, the common variations, how they are typically interpreted in context, and why a doji on its own is not a signal to act. Educational content only; nothing here is trading advice and trading carries risk of loss.
A doji is a single candlestick where the opening price and the closing price are at, or extremely close to, the same level. Because the body is the distance between open and close, a doji has a very thin body or none at all, often appearing as a cross, plus sign, or thin horizontal line with wicks (shadows) extending above and/or below.
In practical charting, an exact match between open and close is uncommon. Most platforms and traders treat a candle as a doji when the body is negligibly small relative to the candle's full high-to-low range. There is no single universal threshold; some traders use a fixed percentage of the range, others judge it visually. Because the definition is partly subjective, two traders can disagree on whether a given candle 'counts' as a doji.
What the shape describes is balance: over that period, price moved around but returned to where it started, so buyers and sellers finished roughly even. That is a description of what already happened, not a forecast of what happens next.
Dojis are usually grouped by where the wicks sit relative to the shared open/close level:
These labels describe geometry only. The same shape can appear in many different market situations, so the variation alone does not tell you what will follow.
Most experienced traders treat a doji as a piece of context rather than a standalone trigger. A common framing is that a doji reflects indecision after a period of directional movement, which some read as a possible pause or loss of momentum. Importantly, indecision can resolve in either direction or simply continue, so a doji does not point anywhere by itself.
Factors traders often weigh alongside a doji include:
The consistent theme is that a doji is information about balance, and any possible meaning depends entirely on what surrounds it. None of these readings is predictive.
Below is a short, valid Pine v6 example that flags candles whose body is small relative to their full range, using a configurable threshold. It is for educational illustration of how a doji-style condition can be expressed in code; it is not a strategy, a signal, or advice, and the chosen threshold is arbitrary.
//@version=6 indicator("Doji Marker (educational)", overlay = true)
// Body as a fraction of the full high-low range maxBodyPct = input.float(5.0, "Max body % of range", minval = 0.1, maxval = 50.0)
bodySize = math.abs(close - open) barRange = high - low
// Avoid division by zero on zero-range bars isDoji = barRange > 0 and (bodySize / barRange) * 100 <= maxBodyPct
plotshape(isDoji, title = "Doji", style = shape.cross, location = location.abovebar, color = color.gray, size = size.tiny)
This script only highlights bars that meet a body-to-range condition. It does not predict direction and does not generate buy or sell instructions. You would still have to interpret each marked candle in its own context.
A doji is descriptive, not predictive. It tells you that one period closed near where it opened; it does not tell you what the next period will do. Dojis appear frequently, including during quiet or low-volume conditions where they carry little meaning, so treating every doji as significant tends to produce a lot of noise.
The partly subjective definition is another limitation: whether a candle is 'a doji' can change with your threshold, your timeframe, and your charting tool. Patterns that look clean in hindsight are also easy to over-read going forward.
Nothing in this article is a recommendation to buy or sell, a signal to act on, or a claim about win rates or outcomes. Candlestick shapes do not guarantee what markets do next, and trading carries a real risk of loss. Use any pattern only as one input within your own research and risk management, and consider seeking independent advice for your specific situation.
Educational only — not financial advice. Trading involves substantial risk of loss.