559 / 736DOJI

Doji

Candle with nearly equal open and close

Doji is a candle whose Open and Close are equal or very close. A small body does not mean little movement during the period and does not by itself confirm a trend reversal.

The shape compares the Open–Close difference with a chosen scale. Reproducible classification requires a predefined tolerance, a closed candle and separation of geometry from future direction.

StockCharts describes Doji through nearly equal Open and Close; exact equality is not always necessary. Upper and lower shadows can have different lengths. [1]

StockCharts relates the assessment to price, volatility and neighboring candles. Choose a precise tolerance for your test; the body-to-range ratio used below is an illustrative rule, not a general standard. [1]

StockCharts shows that prices can move away from Open in both directions and return near it. Doji therefore does not mean that nothing happened during the period. [1]

StockCharts assesses Doji using preceding movement and subsequent confirmation. A single candle is therefore neither a certain reversal nor an automatic buy or sell order. [1]

TradingView explains that a live candle's High, Low and Close change. A temporarily small body may disappear before closing; apply a closed-data rule only at the corresponding time. [2]

Our illustrative ratio divides the body by the High − Low range. When the range is zero, we leave the ratio undefined and do not classify the candle with this rule; this is an explicit condition of our own test. [3]

TradingView warns about lookahead bias. If a strategy requires another candle, its confirmation cannot be used at the original Doji's Close; record detection and entry times separately. [3]

TradingView describes overfitting, selection bias and Slippage. A test must include all occurrences, costs and execution; selected illustrative Doji do not establish a reliable trading edge. [3]

ExampleEXAMPLE · DOJI

Equal Open and Close, nonzero range

A hypothetical candle has Open = Close = 100000, High = 102000 and Low = 98000 USD/BTC. The body is 100000 − 100000 = 0 USD/BTC and the range 102000 − 98000 = 4000 USD/BTC. We choose an illustrative maximum ratio of 0.05; the value 0 / 4000 = 0 meets the condition. This threshold is not a universal definition of Doji. With High = Low the denominator would be zero and we would not calculate the ratio. The diagram shows only known OHLC, not the movement sequence or future price.

For the clearest picture, read this entry together with Candlestick Pattern, Candlestick chart, OHLCV, Timeframe, Slippage, Backtesting. The reverse links also lead from Candlestick Pattern, Engulfing Pattern, Hammer and Shooting Star.

01Must Open and Close be exactly equal?

Not always. The usual description permits nearly equal prices, but a specific test must define the precise tolerance in advance.

02Does Doji after an advance guarantee a decline?

No. Context can change interpretation, but the shape alone does not guarantee reversal. Any further confirmation must not be used retrospectively in a test.

DOC · 001StockCharts — Introduction to CandlesticksDocumentation DOC · 002TradingView — RepaintingDocumentation DOC · 003TradingView — StrategiesDocumentation
Revised: Source-first · No investment advice