CSPThreeWhiteSoldiers: Three White Soldiers Candlestick Pattern

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

Description

Look for Three White Soldiers in a Open/Close price series

Usage

1
  CSPThreeWhiteSoldiers(TS, strict=TRUE, n=20,  minbodysizeMedian=1)

Arguments

TS

xts Time Series containing Open and Close prices

strict

if FALSE, use less strict conditions to detect pattern. See details.

n

number of preceding candles to calculate median candle length

minbodysizeMedian

minimum candle length in relation to the median candle length of n preceding candles

Details

Number of candle lines: 3

The market forms a downtrend. The pattern is characterized by three long candlesticks stepping upward like a staircase. In strict mode, the opening of each day is lower than the previous close but higher than the previous open. When strict=FALSE, candle 2 and/or 3 of the formation may open higher than the previous day's close, thus forming a gap.

Value

A xts object containing the column:

ThreeWhiteSoldiers

TRUE if Three White Soldiers pattern detected

Note

The function filters patterns that look like three white soldiers, 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.candlesticker.com/Bearish.asp

See Also

ThreeBlackCrows CSPNLongWhiteCandles CSPNLongWhiteCandleBodies CSPThreeLineStrike

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
  getSymbols('YHOO',adjust=TRUE)
  CSPThreeWhiteSoldiers(YHOO)
  CSPThreeWhiteSoldiers(YHOO, strict=FALSE)
  
  # filter for three white soldiers that occur in downtrends
  ThreeWhiteSoldiers <- CSPThreeWhiteSoldiers(YHOO) & 
    TrendDetectionChannel(lag(YHOO,k=3))[,"DownTrend"]
  
  # how often does that occur?
  colSums(ThreeWhiteSoldiers, na.rm=TRUE)

## End(Not run)

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