CSPStomach {candlesticks} | R Documentation |
Look for Above/Below The Stomach Pattern in a Open/Close Time Series
CSPStomach(TS)
TS |
xts Time Series containing Open and Close Prices |
Number of candle lines: 2
Above The Stomach:
Prior trend: down
A black candle followed by a white candle. The opening price of the second day must be at or above the mid point of the first candle's body.
Below The Stomach:
Prior trend: up
A white candle followed by a black candle. The opening price of the second day must be at or below the mid point of the first candle's body.
A xts object containing the columns:
AboveTheStomach |
TRUE if Above The Stomach pattern detected |
BelowTheStomach |
TRUE if Below The Stomach pattern detected |
The function filters patterns that look like above/below the Stomach, without considering the current trend direction. If only above the Stomach 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.thepatternsite.com/AboveStomach.html
http://www.thepatternsite.com/BelowStomach.html
## Not run: getSymbols('YHOO',adjust=TRUE) CSPStomach(YHOO) # filter above the Stomach pattern in downtrends CSPStomach(YHOO)[,"AboveTheStomach"] & TrendDetectionChannel(lag(YHOO,k=2))[,"DownTrend"] ## End(Not run)