CSPDarkCloudCover {candlesticks} | R Documentation |
Look for Dark Cloud Covers in a Open/Close price series
CSPDarkCloudCover(TS, n=20, minbodysizeMedian=1)
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 |
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.
A xts object containing the column:
DarkCloudCover |
TRUE if Dark Cloud Cover detected |
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.
Andreas Voellenklee
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
The counterpart of this pattern is PiercingPattern
## 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)