Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/CSPPiercingPattern.R
Look for Piercing Patterns in a Open/Close price series
1 | 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
1 2 3 4 5 6 7 8 9 10 11 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.