Last Updated on August 26, 2023
Doji trading strategies are popular and the doji pattern is one of the most famous candlestick patterns. Candlestick patterns have several “derivatives” and can be used together with other bars. There are at least 64 different candlestick patterns that have been given a name, please read our article about how many candlestick patterns are there?
What is the doji pattern? Can we develop a doji trading strategy? In this article, we backtest a doji strategy on the S&P 500.
Do candlesticks work? Many believe that candlesticks have no predictive value, but our backtests indicate that some of them might be useful. We even wrote an article about 3 bullish candlestick patterns that work.
We use candlesticks as a visual tool on our charts, but so far we have yet to implement them as a stand-alone trading strategy. We use candlesticks as charting simply because they are visually more appealing and they make the chart more “readable”.
But first, let’s start with an explanation of the doji pattern:
List of Doji Trading Strategies
On this page, we have compiled all the trading strategies (investment strategies) we have published since our start in 2012 (plus relevant trading strategy articles). The page contains 200+ free trading strategies plus articles about indicators and trading strategy-specific articles. We are confident you find a viable investment strategies among all these articles.
What is the candlestick pattern called doji?
The doji pattern is mainly classified as a “reversal” pattern, but that doesn’t mean that prices should reverse. It is more correctly viewed as simply the end of a trend. The market has been going in some direction, for example down, and then one day prices finish roughly where they started (the open and the close are more or less at the same price). It is an indication that the bears might be losing control after knocking the index down for a few days. It does not necessarily mean we can expect a bullish upswing. The best time frame for candlesticks is daily bars.
We have a candlestick book written by Gregory L. Morris on our bookshelf called Candlestick Charting Explained. That’s a book we bought back in 1998. This is how Morris defines the doji pattern (he is using the term “spinning top”):
Spinning tops are candlestick lines that have small bodies with upper and lower shadows that are of greater length than the body’s length. This represents indecision between the bulls and the bears….The small body relative to the shadows is what makes the spinning top.
Morris then goes on to explain different types of dojis: doji, long-legged doji, gravestone doji, dragonfly doji, four price doji, stars, and paper umbrella. Quite exotic! A Doji is used together with other bars and candles.
Here is an example of a doji:
As you can see, the “body” is very small and the “shadows” are long. In this case, the doji made a perfect bottom before it rose upwards.
Let’s look at it more systematically and backtest doji strategies on SPY, the ETF for the S&P 500.
Doji candlestick strategy no.1:
Metastock has a built-in pattern recognizer for candlesticks. We simply used that one and ran a backtest on dojis for SPY. The only condition we used is that at least one day of the last two days must be a down day (including the doji). The exit is on the close after two consecutive up days. Here is the result:
45 trades and 36 winners. The average gain is a respectable 0.76% per trade (34.2% in total. The graph shows the return with just 50% allocated capital). The only down year is 2008.
Doji candlestick strategy no.2:
The doji is supposed to be a reversal pattern. What happens if we only go long if the close is below a 10-day moving average?
The number of trades is reduced to only 25, but 22 are winners. The average gain is 1,39% per trade, quite respectable.
What causes this good result? Luck? Good exit? We believe the main reason is that the market is somewhat “oversold” and we sell on a bounce. The doji might have some value, but we’re not sure.
Doji candlestick strategy no. 3: short
What if we turn it upside down and go short? Here is the result vice versa compared to long (and the close of entry must be bigger than the 10 day average of the close):
32 trades, 19 winners and an average gain of 57%. Pretty good for a short strategy!
In general, short is always a lot trickier than long strategies. The only down years are 2006 and 2012. My experience has taught me that the market drops a lot faster than it rises. So let’s put in a target on short of 1%:
A profit target does not get any improvement, it gets worse.
So to sum up, this strategy might be tradeable, but only together with other alternative ones.
If you want to read more about candlestick patterns, we recommend you read the articles on The Robust Trader.
Doji backtest – video
Doji candlestick strategy – conclusions of backtest:
The doji candlestick pattern can be used as input into trading strategies or, as this article has shown, can be used as a stand-alone doji trading strategy.