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]
Equal Open and Close, nonzero range
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.