Description Usage Arguments Details Value Note Author(s) References See Also Examples
Look for Three White Soldiers in a Open/Close price series
1 | CSPThreeWhiteSoldiers(TS, strict=TRUE, n=20, minbodysizeMedian=1)
|
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 |
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.
A xts object containing the column:
ThreeWhiteSoldiers |
TRUE if Three White Soldiers pattern detected |
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.
Andreas Voellenklee
The following site(s) were used to code/document this indicator:
http://www.candlesticker.com/Bullish.asp
http://www.candlesticker.com/Bearish.asp
ThreeBlackCrows
CSPNLongWhiteCandles
CSPNLongWhiteCandleBodies
CSPThreeLineStrike
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.