CSPDoji: Doji Candlestick Pattern

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/CSPDoji.R

Description

Look for Doji Pattern in a OHLC price series

Usage

1
CSPDoji(TS, maxbodyCL=.1, maxshadowCL=.1)

Arguments

TS

xts Time Series containing Open and Close Prices

maxbodyCL

maximum body to length ratio, default = .1

maxshadowCL

maximum tolerated upper (lower) shadow to identify a dragonfly (gravestone) doji

Details

Number of candle lines: 1
A Doji is formed when the open and the close are the same or very close. By default settings, a Doji is identified when the body of the candle is smaller or equal 1/10 of its full lenght.
The bullish Dragonfly Doji pattern has got a long lower shadow, but no upper shadow. In opposition, the bearish Gravestone Doji has got a long upper shadow but no lower shadow. Dragonfly and Gravestone Doji can be reversal signs during down/uptrends.

Value

A xts object containing the columns:

Doji

TRUE if Doji pattern detected

DragonflyDoji

TRUE if Dragonfly Doji pattern detected

GravestoneDoji

TRUE if Gravestone Doji pattern detected

Note

The function filters candles that look like dojis, without considering the current trend direction. If only doji patterns in a uptrend should be filtered, a external trend detection function must be used. See examples.

Author(s)

Andreas Voellenklee

References

The following site(s) were used to code/document this candlestick pattern:
http://www.onlinetradingconcepts.com/TechnicalAnalysis/Candlesticks/Doji.html
http://www.candlesticker.com/Bullish.asp
http://www.candlesticker.com/Bearish.asp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
  getSymbols('YHOO',adjust=TRUE)
  
  CSPDoji(YHOO)
  
  # filter for doji patterns that have exactly equal 
  # open and close prices
  CSPDoji(YHOO, DojiBLRatio=0)
  
  # filter for gravestone doji patterns that occur in uptrends
  CSPDoji(YHOO)[,"GravestoneDoji"] & TrendDetectionChannel(YHOO)[,"UpTrend"]

## End(Not run)

candlesticks documentation built on Feb. 2, 2020, 3:01 a.m.