Doji is one of the most important basic candles acting as a building block of many patterns – both single and multiple lines. According to the classic definition, a doji candle is the candle where the closing price is equal to the opening price. Let's look at some of the definitions employed by other authors.
Steve Nison
A doji occurs when the open and close for that session are the same or very close to being the same.
Greg Morris
Doji occurs when the open and close prices are equal. This is an exceptionally restrictive rule for most types of data and should have some leeway when identifying candle patterns.
Thomas N. Bulkowski
Dragonfly Doji: Price opens and closes at or near the high for the day while having a long lower shadow.
Long-Legged Doji: The opening and closing prices should be the same or nearly so, with long upper and lower shadows.
These definitions can cause problems, because what is meant by “the same or almost the same”? Therefore, in the CandleScanner application it is assumed by default that the doji body may be from 0 to 3 percent of the total candle height. This can be changed however for any value between 0% to 5%.
This variable criterion implies, of course, that the number of doji candle occurrences, and the patterns in which the doji exists as a building block, will increase. This increase will vary depending on the particular market or asset group(s). As we have learned from tests, the scale of growth is also clearly dependent on nominal asset prices - the higher the price is, the greater the growth in the number of doji occurrences. This may range from a dozen to several hundred percent. In practice, increasing the size of the doji body is necessary, primarily for values whose nominal price is greater than $20. Then, the body will be noticeable on the chart.
The decision to expand the definition of the doji also has another side to the coin. By increasing the acceptable size of the doji candle body, we must reckon with the fact that we would not see many patterns. For example, such patterns as Hanging Man, Hammer, Shooting Star or Inverted Hammer will be rejected because their candles, having short bodies, will now be identified as being a doji.
In CandleScanner you can easily spot all doji candles on the chart when using the so called CandleScanner color theme.