Click to go to TraderSmarts
  website


Pitbull image

SP500 heat map


Communities

Blog
  Directory for Stittsville, Ontario
Environmental Activism Blogs - Blog Catalog Blog
  Directory

EncyclopediaT
« Gravestone Doji Candlesticks and Trend Reversal | Main | Sector Inspector - 22 Jan 2012 »
Monday
Jan232012

Dragonfly Doji Candlesticks and Trend Reversal

Dragonfly Doji candlestick after a a downtrend.


The Dragonfly Doji candlestick is one of three special cases of the doji candlestick, the other two being the Gravestone Doji and Long-Legged Doji.  The Dragonfly Doji is a one period trading pattern with the open price being equal to the close price  AND the close equal to the high.  As with the previous post where the doji was backtested, I am using the powerful capabilities of Portfolio123 to evaluate the Dragonfly formation.

Dragonfly Doji Custom Formula

I used the following custom formula to represent the Dragonfly Doji candlestick for testing in Portfolio123:

$DragonflyDoji = Eval(ABS((Open(0)-Close(0))/(Hi(0)-Low(0))) < 0.001,TRUE,FALSE) And (Close(0) = Hi(0))

In order to test for a trend condition I used the Relative Strength Index (RSI) with a 14 day period.  RSI(14) < 30 was considered to be a downward trend.  RSI(14) > 70 an upward trend.  The number of trades and percent profit were recorded for four test cases:

  1. Dragonfly Doji occurs on the last trading day with a downtrend;
  2. Close(0) = Hi(0) with a downtrend (for comparison sake);
  3. Dragonfly Doji occurs on the last trading day with an uptrend;
  4. Close(0) = Hi(0) with an uptrend (for comparison sake).

 

Downtrend With and Without a Dragonfly Doji Candlestick

All stocks in the PRussell 3000 Universe were tested between March 31, 2001 to January 20, 2012 using daily rebalancing and buy/sell at the next open.  PRussell 3000 is Portfolio123's version of the Russell 3000.

Long Entry:   RSI(14) <= 30,
$DragonflyDoji = TRUE
RSI(14) <= 30,
Close(0) = Hi(0)
Long Exit:  
# Trades
% Profit
# Trades % Profit
NoBars >= 1
341
0.60%
6,069
1.16%
NoBars >= 2
338
0.93%
5,629
0.91%
NoBars >= 3
333
1.46%
5,360
1.19%
NoBars >= 4
332
1.15%
5,173
1.31%
NoBars >= 5
329
0.81%
5,040
1.38%
NoBars >= 6
327
0.95%
4,932
1.80%
NoBars >= 7
325
0.93%
4,826
1.67%
NoBars >= 8
325
1.45%
4,749
1.89%
NoBars >= 9
325
2.46%
4,682
2.20%
NoBars >= 10
324
3.46%
4,627
2.28%
NoBars >= 11
323
2.25%
4,583
2.29%
NoBars >= 12
323
3.02%
4,551
2.28%
NoBars >= 13
322
3.21%
4,514
2.60%
NoBars >= 14
321
4.05%
4,473
2.65%
NoBars >= 15 319
3.80%
4,441
2.87%
NoBars >= 16 318
4.47%
4,397
3.16%
NoBars >= 17 318
3.88%
4,372
3.00%
NoBars >= 18 317
4.66%
4,343
3.15%
NoBars >= 19 316
4.84%
4,317
3.18%



Graph showing dragonfly doji candlestick profit per trade statistics after a downtrend.


So it appears, according to the collection of data above, that a Dragonfly Doji candlestick tends to signal the end of a downtrend, resulting in a good opportunity to enter a long position. The average profit after 20 holding days is about 4.8%.  It is interesting that much of the profits (3.2%) are due to the close ending at the high.

 

Uptrend With and Without a Dragonfly Doji Candlestick

Long Entry:   RSI(14) >= 70,
$DragonflyDoji = TRUE
RSI(14) >= 70,
Close(0) = Hi(0)
Long Exit:  
# Trades
% Profit
# Trades % Profit
NoBars >= 1
904
-0.09%
35,822
0.10%
NoBars >= 2
887
0.05%
33,445
0.02%
NoBars >= 3
868
0.06%
31,878
-0.02%
NoBars >= 4
858
0.02%
30,568
0.00%
NoBars >= 5
848
-0.03%
29,606
0.03%
NoBars >= 6
840
-0.06%
28,780
0.03%
NoBars >= 7
831
0.13%
28,020
0.09%
NoBars >= 8
819
0.21%
27,438 0.11%
NoBars >= 9
816
0.34%
26,926
0.21%
NoBars >= 10
810
0.41%
26,498
0.26%
NoBars >= 11
802
0.52%
26,092
0.38%
NoBars >= 12
799
0.55%
25,725
0.48%
NoBars >= 13
793
0.49%
25,381
0.62%
NoBars >= 14
789
0.71%
25,070
0.67%
NoBars >= 15 786
0.74%
24,755
0.75%
NoBars >= 16 784
0.90%
24,495
0.81%
NoBars >= 17 781
0.80%
24,223
0.90%
NoBars >= 18 780
0.76%
23,960
1.02%
NoBars >= 19 779
0.60%
23,739
1.05%
 
Graph summarizing statistics of percent profit versus holding time in an uptrend with a dragonfly doji candlestick
In the case of an uptrend, a Dragonfly Doji doesn't signal the end of the uptrend.  And in fact it doesn;t appear to add much value at all.

Conclusions

The statistics suggest a strong bullish trend reversal from a downtrend and a Dragonfly Doji candlestick.   In up markets the Dragonfly Doji is an insignificant pattern.   Note that sideways markets were not tested and no conclusions can be drawn for this type of market condition.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>