CSPDarkCloudCover: Dark Cloud Cover Candlestick Pattern

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

View source: R/CSPDarkCloudCover.R

Description

Look for Dark Cloud Covers in a Open/Close price series

Usage

1
CSPDarkCloudCover(TS, n=20, minbodysizeMedian=1)

Arguments

TS

xts Time Series containing Open and Close prices

n

number of preceding candles to calculate median candle body length

minbodysizeMedian

Minimum body length relative to the median of the past n body sizes

Details

Number of candle lines: 2

A long white candlestick is followed by a gap higher during the next day while the market is in uptrend. The day ends up as a black candlestick, which closes more than halfway into the prior black candlestick's real body.

Value

A xts object containing the column:

DarkCloudCover

TRUE if Dark Cloud Cover detected

Note

The function filters patterns that look like dark cloud covers, without considering the current trend direction. If only pattern in uptrends 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 indicator:
http://www.candlesticker.com/Bearish.asp
http://www.onlinetradingconcepts.com/TechnicalAnalysis/Candlesticks/DarkCloudCover.html

See Also

The counterpart of this pattern is PiercingPattern

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  getSymbols('YHOO',adjust=TRUE)
  CSPDarkCloudCover(YHOO)
  
  # filter dark cloud covers that occur in uptrends.
  # the lag of 2 periods of the time series for trend detection
  # ensures that the uptrend is active *before* the
  # dark cloud cover occurs.
  CSPDarkCloudCover(YHOO) & TrendDetectionChannel(lag(YHOO,k=2))[,"UpTrend"]

## End(Not run)

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