CSPPiercingPattern: Piercing Candlestick Pattern

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

View source: R/CSPPiercingPattern.R

Description

Look for Piercing Patterns in a Open/Close price series

Usage

1
CSPPiercingPattern(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 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.

Value

A xts object containing the column:

PiercingPattern

TRUE if Piercing Pattern detected

Note

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.

Author(s)

Andreas Voellenklee

References

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

See Also

The counterpart of this pattern is DarkCloudCover

Examples

 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)

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