CSPPiercingPattern {candlesticks} | R Documentation |
Look for Piercing Patterns in a Open/Close price series
CSPPiercingPattern(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 black candlestick is followed by a gap lower during the next day while the market is in downtrend. The day ends up as a white candlestick, which closes more than halfway into the prior black candlestick's real body.
A xts object containing the column:
PiercingPattern |
TRUE if Piercing Pattern detected |
The function filters patterns that look like piercing patterns, without considering the current trend direction. If only pattern in downtrends 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/Bullish.asp
http://www.onlinetradingconcepts.com/TechnicalAnalysis/Candlesticks/PiercingPattern.html
The counterpart of this pattern is DarkCloudCover
## Not run: getSymbols('YHOO',adjust=TRUE) CSPPiercingPattern(YHOO) # filter piercing patterns that occur in downtrends. # the lag of 2 periods of the time series for trend detection # ensures that the uptrend is active *before* the # dark cloud cover occurs. CSPPiercingPattern(YHOO) & TrendDetectionChannel(lag(YHOO,k=2))[,"DownTrend"] ## End(Not run)